home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-04-27 | 80.6 KB | [ONLN/HLX2] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Apr 19 10:39:39 1994, modified Wed Apr 27 06:15:19 1994, creator 'HLX2', type 'ONLN', 79024 bytes "PR10-Printing Loop" , at 0x13530 3299 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
100%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [ONLN] |
macFileCreator | [HLX2] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 12 50 52 31 30 2d 50 | 72 69 6e 74 69 6e 67 20 |..PR10-P|rinting |
|00000010| 4c 6f 6f 70 00 00 00 00 | 00 00 00 00 00 00 00 00 |Loop....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 01 34 b0 00 | 00 0c e3 a9 d9 9d ab a9 |.....4..|........|
|00000060| e3 eb b7 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 b2 0a 00 00 |........|........|
|00000080| 50 52 20 31 30 20 2d 20 | 41 20 50 72 69 6e 74 69 |PR 10 - |A Printi|
|00000090| 6e 67 20 4c 6f 6f 70 20 | 54 68 61 74 20 43 61 72 |ng Loop |That Car|
|000000a0| 65 73 c9 0d 50 72 69 6e | 74 69 6e 67 09 65 72 6e |es..Prin|ting.ern|
|000000b0| 69 67 61 6e 20 26 20 50 | 65 74 65 20 d2 4c 75 6b |igan & P|ete .Luk|
|000000c0| 65 d3 20 41 6c 65 78 61 | 6e 64 65 72 09 4f 63 74 |e. Alexa|nder.Oct|
|000000d0| 6f 62 65 72 20 31 39 39 | 30 0d 54 68 69 73 20 54 |ober 199|0.This T|
|000000e0| 65 63 68 6e 69 63 61 6c | 20 4e 6f 74 65 20 64 69 |echnical| Note di|
|000000f0| 73 63 75 73 73 65 73 20 | 6f 70 65 6e 69 6e 67 20 |scusses |opening |
|00000100| 61 6e 64 20 63 6c 6f 73 | 69 6e 67 20 74 68 65 20 |and clos|ing the |
|00000110| 50 72 69 6e 74 69 6e 67 | 20 4d 61 6e 61 67 65 72 |Printing| Manager|
|00000120| 20 77 69 74 68 20 63 61 | 6c 6c 73 20 74 6f 20 5f | with ca|lls to _|
|00000130| 50 72 4f 70 65 6e 20 61 | 6e 64 20 5f 50 72 43 6c |PrOpen a|nd _PrCl|
|00000140| 6f 73 65 20 61 73 20 77 | 65 6c 6c 20 61 73 20 68 |ose as w|ell as h|
|00000150| 6f 77 20 74 6f 20 68 61 | 6e 64 6c 65 20 65 72 72 |ow to ha|ndle err|
|00000160| 6f 72 73 20 61 74 20 70 | 72 69 6e 74 20 74 69 6d |ors at p|rint tim|
|00000170| 65 2e 0d 43 68 61 6e 67 | 65 73 20 73 69 6e 63 65 |e..Chang|es since|
|00000180| 20 4f 63 74 6f 62 65 72 | 20 31 39 39 30 3a 20 20 | October| 1990: |
|00000190| 41 64 64 65 64 20 63 6f | 64 65 20 69 6e 20 62 6f |Added co|de in bo|
|000001a0| 74 68 20 76 65 72 73 69 | 6f 6e 73 20 74 6f 20 68 |th versi|ons to h|
|000001b0| 61 6e 64 6c 65 20 70 72 | 69 6e 74 69 6e 67 20 64 |andle pr|inting d|
|000001c0| 6f 63 75 6d 65 6e 74 73 | 20 6c 61 72 67 65 72 20 |ocuments| larger |
|000001d0| 74 68 61 6e 20 31 32 38 | 20 70 61 67 65 73 2e 0d |than 128| pages..|
|000001e0| 49 6e 74 72 6f 64 75 63 | 74 69 6f 6e 0d 41 74 20 |Introduc|tion.At |
|000001f0| 6f 6e 65 20 74 69 6d 65 | 2c 20 41 70 70 6c 65 20 |one time|, Apple |
|00000200| 72 65 63 6f 6d 6d 65 6e | 64 65 64 20 74 68 61 74 |recommen|ded that|
|00000210| 20 64 65 76 65 6c 6f 70 | 65 72 73 20 63 61 6c 6c | develop|ers call|
|00000220| 20 5f 50 72 4f 70 65 6e | 20 61 74 20 74 68 65 20 | _PrOpen| at the |
|00000230| 62 65 67 69 6e 6e 69 6e | 67 20 6f 66 20 74 68 65 |beginnin|g of the|
|00000240| 69 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 61 |ir appli|cation a|
|00000250| 6e 64 20 5f 50 72 43 6c | 6f 73 65 20 61 74 20 74 |nd _PrCl|ose at t|
|00000260| 68 65 20 65 6e 64 2c 20 | 62 65 66 6f 72 65 20 72 |he end, |before r|
|00000270| 65 74 75 72 6e 69 6e 67 | 20 74 6f 20 74 68 65 20 |eturning| to the |
|00000280| 46 69 6e 64 65 72 2e 20 | 20 54 68 69 73 20 72 65 |Finder. | This re|
|00000290| 63 6f 6d 6d 65 6e 64 61 | 74 69 6f 6e 20 77 61 73 |commenda|tion was|
|000002a0| 20 69 6e 20 74 68 65 20 | 61 6e 63 69 65 6e 74 20 | in the |ancient |
|000002b0| 70 61 73 74 20 77 68 65 | 6e 20 61 6e 20 61 70 70 |past whe|n an app|
|000002c0| 6c 69 63 61 74 69 6f 6e | 20 6f 6e 6c 79 20 68 61 |lication| only ha|
|000002d0| 64 20 74 6f 20 64 65 61 | 6c 20 77 69 74 68 20 61 |d to dea|l with a|
|000002e0| 20 73 69 6e 67 6c 65 20 | 70 72 69 6e 74 65 72 20 | single |printer |
|000002f0| 64 72 69 76 65 72 2e 0d | 41 73 20 6d 6f 72 65 20 |driver..|As more |
|00000300| 70 72 69 6e 74 65 72 20 | 64 72 69 76 65 72 73 20 |printer |drivers |
|00000310| 62 65 63 61 6d 65 20 61 | 76 61 69 6c 61 62 6c 65 |became a|vailable|
|00000320| 2c 20 69 74 20 62 65 63 | 61 6d 65 20 69 6d 70 6f |, it bec|ame impo|
|00000330| 72 74 61 6e 74 20 66 6f | 72 20 61 6e 20 61 70 70 |rtant fo|r an app|
|00000340| 6c 69 63 61 74 69 6f 6e | 20 74 6f 20 63 6f 6e 73 |lication| to cons|
|00000350| 69 64 65 72 20 74 68 65 | 20 70 72 65 73 65 6e 63 |ider the| presenc|
|00000360| 65 20 6f 66 20 6f 74 68 | 65 72 20 61 70 70 6c 69 |e of oth|er appli|
|00000370| 63 61 74 69 6f 6e 73 20 | 61 6e 64 20 68 6f 77 20 |cations |and how |
|00000380| 6f 70 65 6e 69 6e 67 20 | 61 6e 64 20 63 6c 6f 73 |opening |and clos|
|00000390| 69 6e 67 20 74 68 65 20 | 70 72 69 6e 74 65 72 20 |ing the |printer |
|000003a0| 64 72 69 76 65 72 20 61 | 66 66 65 63 74 65 64 20 |driver a|ffected |
|000003b0| 74 68 65 6d 2e 20 20 54 | 68 65 20 75 73 65 72 20 |them. T|he user |
|000003c0| 63 6f 75 6c 64 20 6f 70 | 65 6e 20 74 68 65 20 43 |could op|en the C|
|000003d0| 68 6f 6f 73 65 72 20 61 | 74 20 61 6e 79 20 74 69 |hooser a|t any ti|
|000003e0| 6d 65 20 61 6e 64 20 63 | 68 61 6e 67 65 20 74 68 |me and c|hange th|
|000003f0| 65 20 63 75 72 72 65 6e | 74 20 70 72 69 6e 74 65 |e curren|t printe|
|00000400| 72 20 64 72 69 76 65 72 | 20 77 69 74 68 6f 75 74 |r driver| without|
|00000410| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 61 70 70 | the cur|rent app|
|00000420| 6c 69 63 61 74 69 6f 6e | d5 73 20 6b 6e 6f 77 6c |lication|.s knowl|
|00000430| 65 64 67 65 2e 20 20 49 | 66 20 61 6e 20 61 70 70 |edge. I|f an app|
|00000440| 6c 69 63 61 74 69 6f 6e | 20 66 6f 6c 6c 6f 77 65 |lication| followe|
|00000450| 64 20 74 68 65 20 6f 6c | 64 20 70 68 69 6c 6f 73 |d the ol|d philos|
|00000460| 6f 70 68 79 20 61 6e 64 | 20 61 20 75 73 65 72 20 |ophy and| a user |
|00000470| 63 68 61 6e 67 65 64 20 | 74 68 65 20 63 75 72 72 |changed |the curr|
|00000480| 65 6e 74 20 70 72 69 6e | 74 65 72 20 64 72 69 76 |ent prin|ter driv|
|00000490| 65 72 20 77 68 69 6c 65 | 20 72 75 6e 6e 69 6e 67 |er while| running|
|000004a0| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|000004b0| 2c 20 74 68 65 20 6e 65 | 78 74 20 74 69 6d 65 20 |, the ne|xt time |
|000004c0| 74 68 65 20 75 73 65 72 | 20 61 74 74 65 6d 70 74 |the user| attempt|
|000004d0| 65 64 20 74 6f 20 70 72 | 69 6e 74 2c 20 74 68 65 |ed to pr|int, the|
|000004e0| 20 77 72 6f 6e 67 20 64 | 72 69 76 65 72 20 77 6f | wrong d|river wo|
|000004f0| 75 6c 64 20 62 65 20 6f | 70 65 6e 2c 20 74 68 65 |uld be o|pen, the|
|00000500| 20 50 72 69 6e 74 69 6e | 67 20 4d 61 6e 61 67 65 | Printin|g Manage|
|00000510| 72 20 77 6f 75 6c 64 20 | 6e 6f 74 20 62 65 20 61 |r would |not be a|
|00000520| 62 6c 65 20 74 6f 20 66 | 69 6e 64 20 74 68 65 20 |ble to f|ind the |
|00000530| 6e 65 63 65 73 73 61 72 | 79 20 72 65 73 6f 75 72 |necessar|y resour|
|00000540| 63 65 73 2c 20 61 6e 64 | 20 74 68 65 20 75 73 65 |ces, and| the use|
|00000550| 72 20 77 6f 75 6c 64 20 | 67 65 74 20 61 6e 20 65 |r would |get an e|
|00000560| 72 72 6f 72 2e 0d 54 68 | 65 20 43 75 72 72 65 6e |rror..Th|e Curren|
|00000570| 74 20 52 65 63 6f 6d 6d | 65 6e 64 61 74 69 6f 6e |t Recomm|endation|
|00000580| 0d 44 54 53 20 63 75 72 | 72 65 6e 74 6c 79 20 72 |.DTS cur|rently r|
|00000590| 65 63 6f 6d 6d 65 6e 64 | 73 20 74 68 61 74 20 61 |ecommend|s that a|
|000005a0| 70 70 6c 69 63 61 74 69 | 6f 6e 73 20 6f 70 65 6e |pplicati|ons open|
|000005b0| 20 61 6e 64 20 63 6c 6f | 73 65 20 74 68 65 20 70 | and clo|se the p|
|000005c0| 72 69 6e 74 65 72 20 64 | 72 69 76 65 72 20 65 61 |rinter d|river ea|
|000005d0| 63 68 20 74 69 6d 65 20 | 74 68 65 20 61 70 70 6c |ch time |the appl|
|000005e0| 69 63 61 74 69 6f 6e 20 | 75 73 65 73 20 74 68 65 |ication |uses the|
|000005f0| 20 50 72 69 6e 74 69 6e | 67 20 4d 61 6e 61 67 65 | Printin|g Manage|
|00000600| 72 2e 0d 4d 50 57 20 50 | 61 73 63 61 6c 0d 2a 2d |r..MPW P|ascal.*-|
|00000610| 2d 2d 2d 2d 2d 20 50 72 | 69 6e 74 53 74 75 66 66 |----- Pr|intStuff|
|00000620| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|00000630| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000640| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000650| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000660| 2d 2a 7d 0d 7b 2a 2a 0d | 20 2a 2a 09 50 72 69 6e |-*}.{**.| **.Prin|
|00000670| 74 53 74 75 66 66 20 77 | 69 6c 6c 20 63 61 6c 6c |tStuff w|ill call|
|00000680| 20 61 6c 6c 20 6f 66 20 | 74 68 65 20 6e 65 63 65 | all of |the nece|
|00000690| 73 73 61 72 79 20 50 72 | 69 6e 74 20 4d 61 6e 61 |ssary Pr|int Mana|
|000006a0| 67 65 72 20 63 61 6c 6c | 73 20 74 6f 20 70 72 69 |ger call|s to pri|
|000006b0| 6e 74 0d 20 2a 2a 09 61 | 20 64 6f 63 75 6d 65 6e |nt. **.a| documen|
|000006c0| 74 2e 20 20 49 74 20 63 | 68 65 63 6b 73 20 50 72 |t. It c|hecks Pr|
|000006d0| 45 72 72 6f 72 28 29 20 | 61 66 74 65 72 20 65 61 |Error() |after ea|
|000006e0| 63 68 20 50 72 69 6e 74 | 20 4d 61 6e 61 67 65 72 |ch Print| Manager|
|000006f0| 20 63 61 6c 6c 2e 20 20 | 49 66 20 61 6e 0d 20 2a | call. |If an. *|
|00000700| 2a 09 65 72 72 6f 72 20 | 69 73 20 66 6f 75 6e 64 |*.error |is found|
|00000710| 2c 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 50 72 69 |, all of| the Pri|
|00000720| 6e 74 20 4d 61 6e 61 67 | 65 72 20 6f 70 65 6e 20 |nt Manag|er open |
|00000730| 63 61 6c 6c 73 20 28 69 | 2e 65 2e 2c 20 50 72 4f |calls (i|.e., PrO|
|00000740| 70 65 6e 2c 0d 20 2a 2a | 09 50 72 4f 70 65 6e 44 |pen,. **|.PrOpenD|
|00000750| 6f 63 2e 2e 2e 29 20 77 | 69 6c 6c 20 68 61 76 65 |oc...) w|ill have|
|00000760| 20 61 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 | a corre|sponding|
|00000770| 20 63 6c 6f 73 65 20 63 | 61 6c 6c 20 62 65 66 6f | close c|all befo|
|00000780| 72 65 20 74 68 65 20 65 | 72 72 6f 72 0d 20 2a 2a |re the e|rror. **|
|00000790| 09 69 73 20 70 6f 73 74 | 65 64 20 74 6f 20 74 68 |.is post|ed to th|
|000007a0| 65 20 75 73 65 72 2e 20 | 20 59 6f 75 20 77 61 6e |e user. | You wan|
|000007b0| 74 20 74 6f 20 75 73 65 | 20 74 68 69 73 20 61 70 |t to use| this ap|
|000007c0| 70 72 6f 61 63 68 20 74 | 6f 20 6d 61 6b 65 20 73 |proach t|o make s|
|000007d0| 75 72 65 20 74 68 65 0d | 20 2a 2a 09 50 72 69 6e |ure the.| **.Prin|
|000007e0| 74 20 4d 61 6e 61 67 65 | 72 20 63 6c 6f 73 65 73 |t Manage|r closes|
|000007f0| 20 70 72 6f 70 65 72 6c | 79 20 61 6e 64 20 61 6c | properl|y and al|
|00000800| 6c 20 74 65 6d 70 6f 72 | 61 72 79 20 6d 65 6d 6f |l tempor|ary memo|
|00000810| 72 79 20 69 73 20 72 65 | 6c 65 61 73 65 64 2e 0d |ry is re|leased..|
|00000820| 20 2a 2a 7d 0d 50 52 4f | 43 45 44 55 52 45 20 50 | **}.PRO|CEDURE P|
|00000830| 72 69 6e 74 53 74 75 66 | 66 3b 0d 56 41 52 0d 20 |rintStuf|f;.VAR. |
|00000840| 20 63 6f 70 69 65 73 2c | 0d 20 20 66 69 72 73 74 | copies,|. first|
|00000850| 50 61 67 65 2c 0d 20 20 | 6c 61 73 74 50 61 67 65 |Page,. |lastPage|
|00000860| 2c 0d 20 20 6c 6f 6f 70 | 2c 0d 20 20 6e 75 6d 62 |,. loop|,. numb|
|00000870| 65 72 4f 66 43 6f 70 69 | 65 73 2c 0d 20 20 70 61 |erOfCopi|es,. pa|
|00000880| 67 65 4e 75 6d 62 65 72 | 2c 0d 20 20 70 72 69 6e |geNumber|,. prin|
|00000890| 74 6d 67 72 73 52 65 73 | 46 69 6c 65 2c 0d 20 20 |tmgrsRes|File,. |
|000008a0| 72 65 61 6c 4e 75 6d 62 | 65 72 4f 66 50 61 67 65 |realNumb|erOfPage|
|000008b0| 73 49 6e 44 6f 63 20 20 | 3a 20 49 6e 74 65 67 65 |sInDoc |: Intege|
|000008c0| 72 3b 0d 20 20 50 72 69 | 6e 74 45 72 72 6f 72 20 |r;. Pri|ntError |
|000008d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3a 20 4c | | : L|
|000008e0| 6f 6e 67 49 6e 74 3b 0d | 20 20 6f 6c 64 50 6f 72 |ongInt;.| oldPor|
|000008f0| 74 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t | |
|00000900| 20 20 3a 20 47 72 61 66 | 50 74 72 3b 0d 20 20 74 | : Graf|Ptr;. t|
|00000910| 68 65 50 72 52 65 63 48 | 64 6c 20 20 20 20 20 20 |hePrRecH|dl |
|00000920| 20 20 20 20 20 20 20 3a | 20 54 48 50 72 69 6e 74 | :| THPrint|
|00000930| 3b 0d 20 20 74 68 65 50 | 72 50 6f 72 74 20 20 20 |;. theP|rPort |
|00000940| 20 20 20 20 20 20 20 20 | 20 20 20 20 3a 20 54 50 | | : TP|
|00000950| 50 72 50 6f 72 74 3b 0d | 20 20 74 68 65 53 74 61 |PrPort;.| theSta|
|00000960| 74 75 73 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |tus | |
|00000970| 20 20 3a 20 54 50 72 53 | 74 61 74 75 73 3b 0d 42 | : TPrS|tatus;.B|
|00000980| 45 47 49 4e 0d 20 20 47 | 65 74 50 6f 72 74 28 6f |EGIN. G|etPort(o|
|00000990| 6c 64 50 6f 72 74 29 3b | 0d 20 20 7b 2a 2a 0d 20 |ldPort);|. {**. |
|000009a0| 20 20 20 20 20 55 6e 4c | 6f 61 64 54 68 65 57 6f | UnL|oadTheWo|
|000009b0| 72 6c 64 20 77 69 6c 6c | 20 73 77 61 70 20 6f 75 |rld will| swap ou|
|000009c0| 74 20 41 4c 4c 20 75 6e | 6e 65 65 64 65 64 20 63 |t ALL un|needed c|
|000009d0| 6f 64 65 20 73 65 67 6d | 65 6e 74 73 20 61 6e 64 |ode segm|ents and|
|000009e0| 20 64 61 74 61 20 74 68 | 61 74 20 61 72 65 20 4e | data th|at are N|
|000009f0| 4f 54 0d 20 20 20 20 20 | 20 72 65 71 75 69 72 65 |OT. | require|
|00000a00| 64 0d 20 20 20 20 20 20 | 64 75 72 69 6e 67 20 70 |d. |during p|
|00000a10| 72 69 6e 74 20 74 69 6d | 65 2e 20 59 6f 75 72 20 |rint tim|e. Your |
|00000a20| 70 72 69 6e 74 20 63 6f | 64 65 20 6d 75 73 74 20 |print co|de must |
|00000a30| 62 65 20 61 20 73 65 70 | 61 72 61 74 65 20 63 6f |be a sep|arate co|
|00000a40| 64 65 20 73 65 67 6d 65 | 6e 74 2e 0d 20 20 2a 2a |de segme|nt.. **|
|00000a50| 7d 0d 20 20 55 6e 4c 6f | 61 64 54 68 65 57 6f 72 |}. UnLo|adTheWor|
|00000a60| 6c 64 3b 0d 20 20 74 68 | 65 50 72 52 65 63 48 64 |ld;. th|ePrRecHd|
|00000a70| 6c 20 3a 3d 20 54 48 50 | 72 69 6e 74 28 4e 65 77 |l := THP|rint(New|
|00000a80| 48 61 6e 64 6c 65 28 53 | 49 5a 45 4f 46 28 54 50 |Handle(S|IZEOF(TP|
|00000a90| 72 69 6e 74 29 29 29 3b | 0d 20 20 49 46 20 28 4d |rint)));|. IF (M|
|00000aa0| 65 6d 45 72 72 6f 72 20 | 3d 20 6e 6f 45 72 72 29 |emError |= noErr)|
|00000ab0| 20 41 4e 44 20 28 74 68 | 65 50 72 52 65 63 48 64 | AND (th|ePrRecHd|
|00000ac0| 6c 20 3c 3e 20 4e 49 4c | 29 20 54 48 45 4e 0d 20 |l <> NIL|) THEN. |
|00000ad0| 20 20 20 42 45 47 49 4e | 0d 20 20 20 20 20 20 50 | BEGIN|. P|
|00000ae0| 72 4f 70 65 6e 3b 0d 20 | 20 20 20 20 20 20 20 49 |rOpen;. | I|
|00000af0| 46 20 28 50 72 45 72 72 | 6f 72 20 3d 20 6e 6f 45 |F (PrErr|or = noE|
|00000b00| 72 72 29 20 54 48 45 4e | 0d 20 20 20 20 20 20 20 |rr) THEN|. |
|00000b10| 20 20 20 42 45 47 49 4e | 0d 20 20 20 20 20 20 20 | BEGIN|. |
|00000b20| 20 20 20 20 20 7b 2a 2a | 0d 20 20 20 20 20 20 20 | {**|. |
|00000b30| 20 20 20 20 20 20 20 20 | 20 53 61 76 65 20 74 68 | | Save th|
|00000b40| 65 20 63 75 72 72 65 6e | 74 20 72 65 73 6f 75 72 |e curren|t resour|
|00000b50| 63 65 20 66 69 6c 65 20 | 28 69 2e 65 2e 20 74 68 |ce file |(i.e. th|
|00000b60| 65 20 70 72 69 6e 74 65 | 72 20 64 72 69 76 65 72 |e printe|r driver|
|00000b70| 27 73 29 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |'s). | |
|00000b80| 20 20 20 20 73 6f 20 74 | 68 65 20 64 72 69 76 65 | so t|he drive|
|00000b90| 72 20 77 69 6c 6c 20 6e | 6f 74 20 6c 6f 73 65 20 |r will n|ot lose |
|00000ba0| 69 74 73 20 72 65 73 6f | 75 72 63 65 73 20 75 70 |its reso|urces up|
|00000bb0| 6f 6e 20 72 65 74 75 72 | 6e 20 66 72 6f 6d 0d 20 |on retur|n from. |
|00000bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 74 | | t|
|00000bd0| 68 65 20 70 49 64 6c 65 | 50 72 6f 63 2e 0d 20 20 |he pIdle|Proc.. |
|00000be0| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2a 7d 0d 20 | | **}. |
|00000bf0| 20 20 20 20 20 20 20 20 | 20 20 20 70 72 69 6e 74 | | print|
|00000c00| 6d 67 72 73 52 65 73 46 | 69 6c 65 20 3a 3d 20 43 |mgrsResF|ile := C|
|00000c10| 75 72 52 65 73 46 69 6c | 65 3b 0d 20 20 20 20 20 |urResFil|e;. |
|00000c20| 20 20 20 20 20 20 20 50 | 72 69 6e 74 44 65 66 61 | P|rintDefa|
|00000c30| 75 6c 74 28 74 68 65 50 | 72 52 65 63 48 64 6c 29 |ult(theP|rRecHdl)|
|00000c40| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 49 46 |;. | IF|
|00000c50| 20 28 50 72 45 72 72 6f | 72 20 3d 20 6e 6f 45 72 | (PrErro|r = noEr|
|00000c60| 72 29 20 54 48 45 4e 0d | 20 20 20 20 20 20 20 20 |r) THEN.| |
|00000c70| 20 20 20 20 20 20 42 45 | 47 49 4e 0d 20 20 20 20 | BE|GIN. |
|00000c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 49 46 20 28 | | IF (|
|00000c90| 50 72 53 74 6c 44 69 61 | 6c 6f 67 28 74 68 65 50 |PrStlDia|log(theP|
|00000ca0| 72 52 65 63 48 64 6c 29 | 29 20 54 48 45 4e 0d 20 |rRecHdl)|) THEN. |
|00000cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000cc0| 20 42 45 47 49 4e 0d 20 | 20 20 20 20 20 20 20 20 | BEGIN. | |
|00000cd0| 20 20 20 20 20 20 20 20 | 20 20 20 7b 2a 2a 0d 20 | | {**. |
|00000ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000cf0| 20 20 20 20 20 20 20 44 | 65 74 65 72 6d 69 6e 65 | D|etermine|
|00000d00| 4e 75 6d 62 65 72 4f 66 | 50 61 67 65 73 69 6e 44 |NumberOf|PagesinD|
|00000d10| 6f 63 20 64 65 74 65 72 | 6d 69 6e 65 73 20 74 68 |oc deter|mines th|
|00000d20| 65 20 6e 75 6d 62 65 72 | 20 6f 66 0d 20 20 20 20 |e number| of. |
|00000d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d40| 20 20 20 20 70 61 67 65 | 73 20 63 6f 6e 74 61 69 | page|s contai|
|00000d50| 6e 65 64 20 69 6e 20 74 | 68 65 20 64 6f 63 75 6d |ned in t|he docum|
|00000d60| 65 6e 74 20 62 79 20 63 | 6f 6d 70 61 72 69 6e 67 |ent by c|omparing|
|00000d70| 20 74 68 65 20 73 69 7a | 65 20 6f 66 0d 20 20 20 | the siz|e of. |
|00000d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d90| 20 20 20 20 20 74 68 65 | 20 64 6f 63 75 6d 65 6e | the| documen|
|00000da0| 74 20 77 69 74 68 20 72 | 50 61 67 65 20 66 72 6f |t with r|Page fro|
|00000db0| 6d 20 74 68 65 20 54 50 | 72 49 6e 66 6f 20 72 65 |m the TP|rInfo re|
|00000dc0| 63 6f 72 64 20 28 49 4d | 20 49 49 2d 31 35 30 29 |cord (IM| II-150)|
|00000dd0| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00000de0| 20 20 20 20 20 20 20 20 | 20 20 49 74 20 72 65 74 | | It ret|
|00000df0| 75 72 6e 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |urns the| number |
|00000e00| 6f 66 20 70 61 67 65 73 | 20 72 65 71 75 69 72 65 |of pages| require|
|00000e10| 64 20 74 6f 20 70 72 69 | 6e 74 20 74 68 65 0d 20 |d to pri|nt the. |
|00000e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e30| 20 20 20 20 20 20 20 64 | 6f 63 75 6d 65 6e 74 20 | d|ocument |
|00000e40| 66 6f 72 20 74 68 65 20 | 63 75 72 72 65 6e 74 6c |for the |currentl|
|00000e50| 79 20 73 65 6c 65 63 74 | 65 64 20 70 72 69 6e 74 |y select|ed print|
|00000e60| 65 72 2e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |er.. | |
|00000e70| 20 20 20 20 20 20 20 20 | 20 2a 2a 7d 0d 20 20 20 | | **}. |
|00000e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e90| 20 72 65 61 6c 4e 75 6d | 62 65 72 4f 66 50 61 67 | realNum|berOfPag|
|00000ea0| 65 73 69 6e 44 6f 63 20 | 3a 3d 20 44 65 74 65 72 |esinDoc |:= Deter|
|00000eb0| 6d 69 6e 65 4e 75 6d 62 | 65 72 4f 66 50 61 67 65 |mineNumb|erOfPage|
|00000ec0| 73 69 6e 44 6f 63 0d 20 | 20 20 20 20 20 20 20 20 |sinDoc. | |
|00000ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ef0| 20 20 20 20 20 20 20 20 | 20 28 74 68 65 50 72 52 | | (thePrR|
|00000f00| 65 63 48 64 6c 5e 5e 2e | 70 72 49 6e 66 6f 2e 72 |ecHdl^^.|prInfo.r|
|00000f10| 50 61 67 65 29 3b 0d 20 | 20 20 20 20 20 20 20 20 |Page);. | |
|00000f20| 20 20 20 20 20 20 20 20 | 20 20 20 49 46 20 28 50 | | IF (P|
|00000f30| 72 4a 6f 62 44 69 61 6c | 6f 67 28 74 68 65 50 72 |rJobDial|og(thePr|
|00000f40| 52 65 63 48 64 6c 29 29 | 20 54 48 45 4e 20 0d 20 |RecHdl))| THEN . |
|00000f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f60| 20 20 20 20 20 42 45 47 | 49 4e 0d 20 20 20 20 20 | BEG|IN. |
|00000f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f80| 20 20 20 7b 2a 2a 0d 20 | 20 20 20 20 20 20 20 20 | {**. | |
|00000f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fa0| 20 20 20 47 65 74 20 74 | 68 65 20 6e 75 6d 62 65 | Get t|he numbe|
|00000fb0| 72 20 6f 66 20 63 6f 70 | 69 65 73 20 6f 66 20 74 |r of cop|ies of t|
|00000fc0| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 74 68 61 74 |he docum|ent that|
|00000fd0| 20 74 68 65 0d 20 20 20 | 20 20 20 20 20 20 20 20 | the. | |
|00000fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ff0| 20 75 73 65 72 20 77 61 | 6e 74 73 20 70 72 69 6e | user wa|nts prin|
|00001000| 74 65 64 20 66 72 6f 6d | 20 69 43 6f 70 69 65 73 |ted from| iCopies|
|00001010| 20 6f 66 20 74 68 65 20 | 54 50 72 4a 6f 62 20 72 | of the |TPrJob r|
|00001020| 65 63 6f 72 64 0d 20 20 | 20 20 20 20 20 20 20 20 |ecord. | |
|00001030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001040| 20 20 28 49 4d 20 49 49 | 2d 31 35 31 29 2e 0d 20 | (IM II|-151).. |
|00001050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001060| 20 20 20 20 20 20 20 20 | 2a 2a 7d 0d 20 20 20 20 | |**}. |
|00001070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001080| 20 20 20 20 6e 75 6d 62 | 65 72 4f 66 43 6f 70 69 | numb|erOfCopi|
|00001090| 65 73 20 3a 3d 20 74 68 | 65 50 72 52 65 63 48 64 |es := th|ePrRecHd|
|000010a0| 6c 5e 5e 2e 70 72 4a 6f | 62 2e 69 43 6f 70 69 65 |l^^.prJo|b.iCopie|
|000010b0| 73 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s;. | |
|000010c0| 20 20 20 20 20 20 20 20 | 20 20 20 7b 2a 2a 0d 20 | | {**. |
|000010d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000010e0| 20 20 20 20 20 20 20 20 | 20 20 20 47 65 74 20 74 | | Get t|
|000010f0| 68 65 20 66 69 72 73 74 | 20 61 6e 64 20 6c 61 73 |he first| and las|
|00001100| 74 20 70 61 67 65 73 20 | 6f 66 20 74 68 65 20 64 |t pages |of the d|
|00001110| 6f 63 75 6d 65 6e 74 20 | 74 68 61 74 0d 20 20 20 |ocument |that. |
|00001120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001130| 20 20 20 20 20 20 20 20 | 20 77 65 72 65 20 72 65 | | were re|
|00001140| 71 75 65 73 74 65 64 20 | 74 6f 20 62 65 20 70 72 |quested |to be pr|
|00001150| 69 6e 74 65 64 20 62 79 | 20 74 68 65 20 75 73 65 |inted by| the use|
|00001160| 72 20 66 72 6f 6d 20 69 | 46 73 74 50 61 67 65 0d |r from i|FstPage.|
|00001170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001180| 20 20 20 20 20 20 20 20 | 20 20 20 20 61 6e 64 20 | | and |
|00001190| 69 4c 61 73 74 50 61 67 | 65 20 66 72 6f 6d 20 74 |iLastPag|e from t|
|000011a0| 68 65 20 54 50 72 4a 6f | 62 20 72 65 63 6f 72 64 |he TPrJo|b record|
|000011b0| 20 28 49 4d 20 49 49 2d | 31 35 31 29 2e 0d 20 20 | (IM II-|151).. |
|000011c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011d0| 20 20 20 20 20 20 20 2a | 2a 7d 0d 20 20 20 20 20 | *|*}. |
|000011e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011f0| 20 20 20 66 69 72 73 74 | 50 61 67 65 20 3a 3d 20 | first|Page := |
|00001200| 74 68 65 50 72 52 65 63 | 48 64 6c 5e 5e 2e 70 72 |thePrRec|Hdl^^.pr|
|00001210| 4a 6f 62 2e 69 46 73 74 | 50 61 67 65 3b 0d 20 20 |Job.iFst|Page;. |
|00001220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001230| 20 20 20 20 20 20 6c 61 | 73 74 50 61 67 65 20 3a | la|stPage :|
|00001240| 3d 20 74 68 65 50 72 52 | 65 63 48 64 6c 5e 5e 2e |= thePrR|ecHdl^^.|
|00001250| 70 72 4a 6f 62 2e 69 4c | 73 74 50 61 67 65 3b 0d |prJob.iL|stPage;.|
|00001260| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001270| 20 20 20 20 20 20 20 20 | 7b 2a 2a 0d 20 20 20 20 | |{**. |
|00001280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001290| 20 20 20 20 20 20 20 20 | 50 72 69 6e 74 20 22 61 | |Print "a|
|000012a0| 6c 6c 22 20 70 61 67 65 | 73 20 69 6e 20 74 68 65 |ll" page|s in the|
|000012b0| 20 70 72 69 6e 74 20 6c | 6f 6f 70 0d 20 20 20 20 | print l|oop. |
|000012c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012d0| 20 20 20 20 20 2a 2a 7d | 0d 20 20 20 20 20 20 20 | **}|. |
|000012e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012f0| 20 74 68 65 50 72 52 65 | 63 48 64 6c 5e 5e 2e 70 | thePrRe|cHdl^^.p|
|00001300| 72 4a 6f 62 2e 69 46 73 | 74 50 61 67 65 20 3a 3d |rJob.iFs|tPage :=|
|00001310| 20 31 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | 1;. | |
|00001320| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 68 65 50 | | theP|
|00001330| 72 52 65 63 48 64 6c 5e | 5e 2e 70 72 4a 6f 62 2e |rRecHdl^|^.prJob.|
|00001340| 69 4c 73 74 50 61 67 65 | 20 3a 3d 20 39 39 39 39 |iLstPage| := 9999|
|00001350| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00001360| 20 20 20 20 20 20 20 20 | 20 20 7b 2a 2a 0d 20 20 | | {**. |
|00001370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001380| 20 20 20 20 20 20 20 20 | 20 20 44 65 74 65 72 6d | | Determ|
|00001390| 69 6e 65 20 74 68 65 20 | 22 72 65 61 6c 22 20 6e |ine the |"real" n|
|000013a0| 75 6d 62 65 72 20 6f 66 | 20 70 61 67 65 73 20 63 |umber of| pages c|
|000013b0| 6f 6e 74 61 69 6e 65 64 | 20 69 6e 0d 20 20 20 20 |ontained| in. |
|000013c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013d0| 20 20 20 20 20 20 20 20 | 74 68 65 20 64 6f 63 75 | |the docu|
|000013e0| 6d 65 6e 74 2e 20 20 57 | 69 74 68 6f 75 74 20 74 |ment. W|ithout t|
|000013f0| 68 69 73 20 74 65 73 74 | 2c 20 79 6f 75 20 77 6f |his test|, you wo|
|00001400| 75 6c 64 20 70 72 69 6e | 74 0d 20 20 20 20 20 20 |uld prin|t. |
|00001410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001420| 20 20 20 20 20 20 39 39 | 39 39 20 70 61 67 65 73 | 99|99 pages|
|00001430| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00001440| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2a 7d 0d 20 | | **}. |
|00001450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001460| 20 20 20 20 20 20 20 49 | 46 20 28 72 65 61 6c 4e | I|F (realN|
|00001470| 75 6d 62 65 72 4f 66 50 | 61 67 65 73 69 6e 44 6f |umberOfP|agesinDo|
|00001480| 63 20 3c 20 6c 61 73 74 | 50 61 67 65 29 20 54 48 |c < last|Page) TH|
|00001490| 45 4e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |EN. | |
|000014a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6c 61 73 | | las|
|000014b0| 74 50 61 67 65 20 3a 3d | 20 72 65 61 6c 4e 75 6d |tPage :=| realNum|
|000014c0| 62 65 72 4f 66 50 61 67 | 65 73 69 6e 44 6f 63 3b |berOfPag|esinDoc;|
|000014d0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000014e0| 20 20 20 20 20 20 20 20 | 20 50 72 69 6e 74 69 6e | | Printin|
|000014f0| 67 53 74 61 74 75 73 44 | 69 61 6c 6f 67 20 3a 3d |gStatusD|ialog :=|
|00001500| 20 47 65 74 4e 65 77 44 | 69 61 6c 6f 67 28 32 35 | GetNewD|ialog(25|
|00001510| 37 2c 20 4e 49 4c 2c 20 | 50 4f 49 4e 54 45 52 28 |7, NIL, |POINTER(|
|00001520| 2d 31 29 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |-1));. | |
|00001530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 0d 20 | | . |
|00001540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001550| 20 20 20 20 20 20 20 7b | 2a 2a 0d 20 20 20 20 20 | {|**. |
|00001560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001570| 20 20 20 20 20 20 20 50 | 72 69 6e 74 20 74 68 65 | P|rint the|
|00001580| 20 6e 75 6d 62 65 72 20 | 6f 66 20 63 6f 70 69 65 | number |of copie|
|00001590| 73 20 6f 66 20 64 6f 63 | 75 6d 65 6e 74 20 72 65 |s of doc|ument re|
|000015a0| 71 75 65 73 74 65 64 20 | 62 79 20 74 68 65 0d 09 |quested |by the..|
|000015b0| 09 09 20 20 20 20 20 20 | 75 73 65 72 0d 20 20 20 |.. |user. |
|000015c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000015d0| 20 20 20 20 20 20 20 20 | 20 66 72 6f 6d 20 74 68 | | from th|
|000015e0| 65 20 50 72 69 6e 74 20 | 4a 6f 62 20 44 69 61 6c |e Print |Job Dial|
|000015f0| 6f 67 2e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |og.. | |
|00001600| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2a 2a 7d | | **}|
|00001610| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001620| 20 20 20 20 20 20 20 20 | 20 46 6f 72 20 63 6f 70 | | For cop|
|00001630| 69 65 73 20 3a 3d 20 31 | 20 54 6f 20 6e 75 6d 62 |ies := 1| To numb|
|00001640| 65 72 4f 66 43 6f 70 69 | 65 73 20 44 6f 0d 20 20 |erOfCopi|es Do. |
|00001650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001660| 20 20 20 20 20 20 20 20 | 42 45 47 49 4e 0d 20 20 | |BEGIN. |
|00001670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001680| 20 20 20 20 20 20 20 20 | 20 20 7b 2a 2a 0d 20 20 | | {**. |
|00001690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000016a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 49 6e | | In|
|000016b0| 73 74 61 6c 6c 20 61 20 | 70 6f 69 6e 74 65 72 20 |stall a |pointer |
|000016c0| 74 6f 20 79 6f 75 72 20 | 70 49 64 6c 65 20 70 72 |to your |pIdle pr|
|000016d0| 6f 63 20 69 6e 20 6d 79 | 20 70 72 69 6e 74 20 72 |oc in my| print r|
|000016e0| 65 63 6f 72 64 2e 0d 20 | 20 20 20 20 20 20 20 20 |ecord.. | |
|000016f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001700| 20 20 20 20 2a 2a 7d 0d | 20 20 20 20 20 20 20 20 | **}.| |
|00001710| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001720| 20 20 20 20 20 74 68 65 | 50 72 52 65 63 48 64 6c | the|PrRecHdl|
|00001730| 5e 5e 2e 70 72 4a 6f 62 | 2e 70 49 64 6c 65 50 72 |^^.prJob|.pIdlePr|
|00001740| 6f 63 20 3a 3d 20 40 63 | 68 65 63 6b 4d 79 50 72 |oc := @c|heckMyPr|
|00001750| 69 6e 74 44 69 61 6c 6f | 67 42 75 74 74 6f 6e 3b |intDialo|gButton;|
|00001760| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7b 2a 2a | | {**|
|00001780| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017a0| 20 52 65 73 74 6f 72 65 | 20 74 68 65 20 72 65 73 | Restore| the res|
|000017b0| 6f 75 72 63 65 20 66 69 | 6c 65 20 74 6f 20 74 68 |ource fi|le to th|
|000017c0| 65 20 70 72 69 6e 74 65 | 72 20 64 72 69 76 65 72 |e printe|r driver|
|000017d0| 27 73 2e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |'s.. | |
|000017e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017f0| 20 2a 2a 7d 0d 20 20 20 | 20 20 20 20 20 20 20 20 | **}. | |
|00001800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001810| 20 55 73 65 52 65 73 46 | 69 6c 65 28 70 72 69 6e | UseResF|ile(prin|
|00001820| 74 6d 67 72 73 52 65 73 | 46 69 6c 65 29 3b 0d 20 |tmgrsRes|File);. |
|00001830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001840| 20 20 20 20 20 20 20 20 | 20 20 20 74 68 65 50 72 | | thePr|
|00001850| 50 6f 72 74 20 3a 3d 20 | 50 72 4f 70 65 6e 44 6f |Port := |PrOpenDo|
|00001860| 63 28 74 68 65 50 72 52 | 65 63 48 64 6c 2c 20 4e |c(thePrR|ecHdl, N|
|00001870| 49 4c 2c 20 4e 49 4c 29 | 3b 0d 20 20 20 20 20 20 |IL, NIL)|;. |
|00001880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001890| 20 20 20 20 20 20 49 46 | 20 28 50 72 45 72 72 6f | IF| (PrErro|
|000018a0| 72 20 3d 20 6e 6f 45 72 | 72 29 20 54 48 45 4e 0d |r = noEr|r) THEN.|
|000018b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000018c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 42 45 | | BE|
|000018d0| 47 49 4e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |GIN. | |
|000018e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000018f0| 20 20 20 20 7b 2a 2a 0d | 20 20 20 20 20 20 20 20 | {**.| |
|00001900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001910| 20 20 20 20 20 20 20 20 | 20 20 20 20 50 72 69 6e | | Prin|
|00001920| 74 20 74 68 65 20 72 61 | 6e 67 65 20 6f 66 20 70 |t the ra|nge of p|
|00001930| 61 67 65 73 20 6f 66 20 | 74 68 65 20 64 6f 63 75 |ages of |the docu|
|00001940| 6d 65 6e 74 20 72 65 71 | 75 65 73 74 65 64 0d 20 |ment req|uested. |
|00001950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001970| 20 20 20 62 79 20 74 68 | 65 20 75 73 65 72 20 66 | by th|e user f|
|00001980| 72 6f 6d 20 74 68 65 20 | 50 72 69 6e 74 20 4a 6f |rom the |Print Jo|
|00001990| 62 20 44 69 61 6c 6f 67 | 2e 0d 20 20 20 20 20 20 |b Dialog|.. |
|000019a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000019b0| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2a 7d 0d 20 | | **}. |
|000019c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000019d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 70 | | p|
|000019e0| 61 67 65 4e 75 6d 62 65 | 72 20 3a 3d 20 66 69 72 |ageNumbe|r := fir|
|000019f0| 73 74 50 61 67 65 3b 0d | 20 20 20 20 20 20 20 20 |stPage;.| |
|00001a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001a10| 20 20 20 20 20 20 20 20 | 57 48 49 4c 45 20 28 28 | |WHILE ((|
|00001a20| 70 61 67 65 4e 75 6d 62 | 65 72 20 3c 3d 20 6c 61 |pageNumb|er <= la|
|00001a30| 73 74 50 61 67 65 29 20 | 41 4e 44 20 28 50 72 45 |stPage) |AND (PrE|
|00001a40| 72 72 6f 72 20 3d 20 6e | 6f 45 72 72 29 29 20 44 |rror = n|oErr)) D|
|00001a50| 4f 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |O. | |
|00001a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001a70| 20 20 20 20 42 45 47 49 | 4e 0d 09 09 09 09 09 20 | BEGI|N...... |
|00001a80| 20 0d 09 09 09 09 20 20 | 20 20 7b 20 2a 2a 0d 09 | ..... | { **..|
|00001a90| 09 09 09 09 49 66 20 77 | 65 27 76 65 20 63 72 6f |....If w|e've cro|
|00001aa0| 73 73 65 64 20 61 20 31 | 32 38 2d 70 61 67 65 20 |ssed a 1|28-page |
|00001ab0| 62 6f 75 6e 64 61 72 79 | 2c 0d 09 09 09 09 09 63 |boundary|,......c|
|00001ac0| 6c 6f 73 65 20 74 68 65 | 20 63 75 72 72 65 6e 74 |lose the| current|
|00001ad0| 20 70 72 69 6e 74 20 66 | 69 6c 65 2c 20 73 65 6e | print f|ile, sen|
|00001ae0| 64 20 69 74 0d 09 09 09 | 09 09 74 6f 20 74 68 65 |d it....|..to the|
|00001af0| 20 70 72 69 6e 74 65 72 | 20 69 66 20 6e 65 63 65 | printer| if nece|
|00001b00| 73 73 61 72 79 2c 20 61 | 6e 64 20 6f 70 65 6e 20 |ssary, a|nd open |
|00001b10| 61 0d 09 09 09 09 09 6e | 65 77 20 64 6f 63 75 6d |a......n|ew docum|
|00001b20| 65 6e 74 2e 0d 09 09 09 | 09 20 20 20 20 2a 2a 20 |ent.....|. ** |
|00001b30| 7d 0d 09 09 09 09 09 20 | 20 0d 09 09 09 09 20 20 |}...... | ..... |
|00001b40| 20 20 49 46 20 28 70 61 | 67 65 4e 75 6d 62 65 72 | IF (pa|geNumber|
|00001b50| 20 2d 20 66 69 72 73 74 | 50 61 67 65 29 20 4d 4f | - first|Page) MO|
|00001b60| 44 20 69 50 46 4d 61 78 | 50 67 73 20 3d 20 30 20 |D iPFMax|Pgs = 0 |
|00001b70| 54 48 45 4e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |THEN. | |
|00001b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001b90| 20 20 20 20 20 20 20 20 | 20 20 20 42 45 47 49 4e | | BEGIN|
|00001ba0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001bc0| 20 20 20 20 20 20 20 20 | 20 49 46 20 70 61 67 65 | | IF page|
|00001bd0| 4e 75 6d 62 65 72 20 3c | 3e 20 66 69 72 73 74 50 |Number <|> firstP|
|00001be0| 61 67 65 20 54 48 45 4e | 0d 20 20 20 20 20 20 20 |age THEN|. |
|00001bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c10| 20 20 20 42 45 47 49 4e | 0d 20 20 20 20 20 20 20 | BEGIN|. |
|00001c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c40| 20 20 20 20 20 50 72 43 | 6c 6f 73 65 44 6f 63 28 | PrC|loseDoc(|
|00001c50| 74 68 65 50 72 50 6f 72 | 74 29 3b 0d 20 20 20 20 |thePrPor|t);. |
|00001c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c80| 20 20 20 20 20 20 20 20 | 49 46 20 28 74 68 65 50 | |IF (theP|
|00001c90| 72 52 65 63 48 64 6c 5e | 5e 2e 70 72 4a 6f 62 2e |rRecHdl^|^.prJob.|
|00001ca0| 62 4a 44 6f 63 4c 6f 6f | 70 20 3d 20 62 53 70 6f |bJDocLoo|p = bSpo|
|00001cb0| 6f 6c 4c 6f 6f 70 29 0d | 20 20 20 20 20 20 20 20 |olLoop).| |
|00001cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ce0| 20 20 20 20 20 20 41 4e | 44 20 28 50 72 45 72 72 | AN|D (PrErr|
|00001cf0| 6f 72 20 3d 20 6e 6f 45 | 72 72 29 20 54 48 45 4e |or = noE|rr) THEN|
|00001d00| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 50 | | P|
|00001d30| 72 50 69 63 46 69 6c 65 | 28 74 68 65 50 72 52 65 |rPicFile|(thePrRe|
|00001d40| 63 48 64 6c 2c 20 4e 49 | 4c 2c 4e 49 4c 2c 20 4e |cHdl, NI|L,NIL, N|
|00001d50| 49 4c 2c 20 74 68 65 53 | 74 61 74 75 73 29 3b 0d |IL, theS|tatus);.|
|00001d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 68 65 50 | | theP|
|00001d90| 72 50 6f 72 74 20 3a 3d | 20 50 72 4f 70 65 6e 44 |rPort :=| PrOpenD|
|00001da0| 6f 63 28 74 68 65 50 72 | 52 65 63 48 64 6c 2c 20 |oc(thePr|RecHdl, |
|00001db0| 4e 49 4c 2c 20 4e 49 4c | 29 3b 0d 20 20 20 20 20 |NIL, NIL|);. |
|00001dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001de0| 20 20 20 20 20 45 4e 44 | 3b 0d 20 20 20 20 20 20 | END|;. |
|00001df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e10| 20 20 45 4e 44 3b 0d 09 | 09 09 09 20 20 20 20 20 | END;..|... |
|00001e20| 20 50 72 4f 70 65 6e 50 | 61 67 65 28 74 68 65 50 | PrOpenP|age(theP|
|00001e30| 72 50 6f 72 74 2c 20 4e | 49 4c 29 3b 0d 20 20 20 |rPort, N|IL);. |
|00001e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e60| 20 20 20 49 46 20 28 50 | 72 45 72 72 6f 72 20 3d | IF (P|rError =|
|00001e70| 20 6e 6f 45 72 72 29 20 | 54 48 45 4e 0d 20 20 20 | noErr) |THEN. |
|00001e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ea0| 20 20 20 20 20 42 45 47 | 49 4e 0d 20 20 20 20 20 | BEG|IN. |
|00001eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ed0| 20 20 20 20 20 7b 2a 2a | 0d 20 20 20 20 20 20 20 | {**|. |
|00001ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f00| 20 20 20 20 20 20 20 72 | 50 61 67 65 20 28 49 4d | r|Page (IM|
|00001f10| 20 49 49 2d 31 35 30 29 | 20 69 73 20 74 68 65 20 | II-150)| is the |
|00001f20| 70 72 69 6e 74 61 62 6c | 65 0d 20 20 20 20 20 20 |printabl|e. |
|00001f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f50| 20 20 20 20 20 20 20 20 | 61 72 65 61 20 66 6f 72 | |area for|
|00001f60| 20 74 68 65 20 63 75 72 | 72 65 6e 74 6c 79 20 73 | the cur|rently s|
|00001f70| 65 6c 65 63 74 65 64 20 | 70 72 69 6e 74 65 72 2e |elected |printer.|
|00001f80| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 42 | | B|
|00001fb0| 79 20 70 61 73 73 69 6e | 67 20 74 68 65 20 63 75 |y passin|g the cu|
|00001fc0| 72 72 65 6e 74 20 65 6e | 61 62 6c 65 73 20 79 6f |rrent en|ables yo|
|00001fd0| 75 72 20 61 70 70 20 74 | 6f 20 75 73 65 0d 09 09 |ur app t|o use...|
|00001fe0| 09 09 09 20 20 20 20 20 | 20 74 68 65 20 73 61 6d |... | the sam|
|00001ff0| 65 20 72 6f 75 74 69 6e | 65 20 74 6f 20 64 72 61 |e routin|e to dra|
|00002000| 77 20 74 6f 20 74 68 65 | 20 73 63 72 65 65 6e 20 |w to the| screen |
|00002010| 61 6e 64 20 74 68 65 0d | 09 09 09 09 09 20 20 20 |and the.|..... |
|00002020| 20 20 20 70 72 69 6e 74 | 65 72 27 73 20 47 72 61 | print|er's Gra|
|00002030| 66 50 6f 72 74 2e 0d 20 | 20 20 20 20 20 20 20 20 |fPort.. | |
|00002040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002060| 20 20 2a 2a 7d 0d 20 20 | 20 20 20 20 20 20 20 20 | **}. | |
|00002070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002090| 44 72 61 77 53 74 75 66 | 66 20 28 74 68 65 50 72 |DrawStuf|f (thePr|
|000020a0| 52 65 63 48 64 6c 5e 5e | 2e 70 72 49 6e 66 6f 2e |RecHdl^^|.prInfo.|
|000020b0| 72 50 61 67 65 2c 20 0d | 20 20 20 20 20 20 20 20 |rPage, .| |
|000020c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 47 72 61 | | Gra|
|000020f0| 66 50 74 72 20 28 74 68 | 65 50 72 50 6f 72 74 29 |fPtr (th|ePrPort)|
|00002100| 2c 20 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |, . | |
|00002110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002130| 20 20 20 20 20 20 20 20 | 70 61 67 65 4e 75 6d 62 | |pageNumb|
|00002140| 65 72 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |er);. | |
|00002150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 45 4e 44 | | END|
|00002170| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00002180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002190| 20 20 20 20 20 20 20 20 | 50 72 43 6c 6f 73 65 50 | |PrCloseP|
|000021a0| 61 67 65 28 74 68 65 50 | 72 50 6f 72 74 29 3b 0d |age(theP|rPort);.|
|000021b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021d0| 20 20 20 20 20 20 70 61 | 67 65 4e 75 6d 62 65 72 | pa|geNumber|
|000021e0| 20 3a 3d 20 70 61 67 65 | 4e 75 6d 62 65 72 20 2b | := page|Number +|
|000021f0| 20 31 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | 1;. | |
|00002200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002210| 20 20 20 20 20 20 45 4e | 44 3b 20 20 7b 2a 2a 20 | EN|D; {** |
|00002220| 20 45 6e 64 20 70 61 67 | 65 6e 75 6d 62 65 72 20 | End pag|enumber |
|00002230| 6c 6f 6f 70 20 20 2a 2a | 7d 0d 20 20 20 20 20 20 |loop **|}. |
|00002240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002250| 20 20 20 20 20 20 20 20 | 45 4e 44 3b 0d 20 20 20 | |END;. |
|00002260| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002270| 20 20 20 20 20 20 20 20 | 20 50 72 43 6c 6f 73 65 | | PrClose|
|00002280| 44 6f 63 28 74 68 65 50 | 72 50 6f 72 74 29 3b 0d |Doc(theP|rPort);.|
|00002290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000022a0| 20 20 20 20 20 20 20 20 | 20 20 45 4e 44 3b 20 20 | | END; |
|000022b0| 7b 2a 2a 20 20 45 6e 64 | 20 63 6f 70 69 65 73 20 |{** End| copies |
|000022c0| 6c 6f 6f 70 20 20 2a 2a | 7d 0d 20 20 20 20 20 20 |loop **|}. |
|000022d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000022e0| 20 20 20 20 7b 2a 2a 0d | 20 20 20 20 20 20 20 20 | {**.| |
|000022f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002300| 20 20 20 20 20 20 54 68 | 65 20 70 72 69 6e 74 69 | Th|e printi|
|00002310| 6e 67 20 6a 6f 62 20 69 | 73 20 62 65 69 6e 67 20 |ng job i|s being |
|00002320| 63 61 6e 63 65 6c 65 64 | 20 62 79 20 74 68 65 20 |canceled| by the |
|00002330| 72 65 71 75 65 73 74 20 | 6f 66 0d 20 20 20 20 20 |request |of. |
|00002340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002350| 20 20 20 20 20 20 20 20 | 20 74 68 65 20 75 73 65 | | the use|
|00002360| 72 20 66 72 6f 6d 20 74 | 68 65 20 50 72 69 6e 74 |r from t|he Print|
|00002370| 20 53 74 79 6c 65 20 44 | 69 61 6c 6f 67 20 6f 72 | Style D|ialog or|
|00002380| 20 74 68 65 20 50 72 69 | 6e 74 20 4a 6f 62 0d 20 | the Pri|nt Job. |
|00002390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 44 69 61 | | Dia|
|000023b0| 6c 6f 67 2e 20 20 50 72 | 45 72 72 6f 72 20 77 69 |log. Pr|Error wi|
|000023c0| 6c 6c 20 62 65 20 73 65 | 74 20 74 6f 20 69 50 72 |ll be se|t to iPr|
|000023d0| 41 62 6f 72 74 20 74 6f | 20 74 65 6c 6c 20 74 68 |Abort to| tell th|
|000023e0| 65 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | |
|000023f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002400| 50 72 69 6e 74 20 4d 61 | 6e 61 67 65 72 20 74 6f |Print Ma|nager to|
|00002410| 20 61 62 6f 72 74 20 74 | 68 65 20 63 75 72 72 65 | abort t|he curre|
|00002420| 6e 74 20 70 72 69 6e 74 | 69 6e 67 20 6a 6f 62 2e |nt print|ing job.|
|00002430| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002440| 20 20 20 20 20 20 20 20 | 20 20 20 20 2a 2a 7d 0d | | **}.|
|00002450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002460| 20 20 20 20 20 20 45 4e | 44 0d 20 20 20 20 20 20 | EN|D. |
|00002470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002480| 20 20 45 4c 53 45 0d 20 | 20 20 20 20 20 20 20 20 | ELSE. | |
|00002490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 50 72 53 | | PrS|
|000024a0| 65 74 45 72 72 6f 72 28 | 69 50 72 41 62 6f 72 74 |etError(|iPrAbort|
|000024b0| 29 3b 20 20 20 7b 2a 2a | 20 20 43 61 6e 63 65 6c |); {**| Cancel|
|000024c0| 20 66 72 6f 6d 20 74 68 | 65 20 6a 6f 62 20 64 69 | from th|e job di|
|000024d0| 61 6c 6f 67 20 20 2a 2a | 7d 0d 20 20 20 20 20 20 |alog **|}. |
|000024e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 45 4e 44 0d | | END.|
|000024f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002500| 20 20 20 20 45 4c 53 45 | 0d 20 20 20 20 20 20 20 | ELSE|. |
|00002510| 20 20 20 20 20 20 20 20 | 20 20 20 50 72 53 65 74 | | PrSet|
|00002520| 45 72 72 6f 72 28 69 50 | 72 41 62 6f 72 74 29 3b |Error(iP|rAbort);|
|00002530| 20 20 20 7b 2a 2a 20 20 | 43 61 6e 63 65 6c 20 66 | {** |Cancel f|
|00002540| 72 6f 6d 20 74 68 65 20 | 73 74 79 6c 65 20 64 69 |rom the |style di|
|00002550| 61 6c 6f 67 20 20 2a 2a | 7d 0d 20 20 20 20 20 20 |alog **|}. |
|00002560| 20 20 20 20 20 20 20 20 | 45 4e 44 3b 0d 20 20 20 | |END;. |
|00002570| 20 20 20 20 20 20 20 45 | 4e 44 3b 0d 20 20 20 20 | E|ND;. |
|00002580| 49 46 20 28 74 68 65 50 | 72 52 65 63 48 64 6c 5e |IF (theP|rRecHdl^|
|00002590| 5e 2e 70 72 4a 6f 62 2e | 62 4a 44 6f 63 4c 6f 6f |^.prJob.|bJDocLoo|
|000025a0| 70 20 3d 20 62 53 70 6f | 6f 6c 4c 6f 6f 70 29 20 |p = bSpo|olLoop) |
|000025b0| 61 6e 64 20 28 50 72 45 | 72 72 6f 72 20 3d 20 6e |and (PrE|rror = n|
|000025c0| 6f 45 72 72 29 20 54 48 | 45 4e 0d 20 20 20 20 20 |oErr) TH|EN. |
|000025d0| 20 50 72 50 69 63 46 69 | 6c 65 28 74 68 65 50 72 | PrPicFi|le(thePr|
|000025e0| 52 65 63 48 64 6c 2c 20 | 4e 49 4c 2c 20 4e 49 4c |RecHdl, |NIL, NIL|
|000025f0| 2c 20 4e 49 4c 2c 20 74 | 68 65 53 74 61 74 75 73 |, NIL, t|heStatus|
|00002600| 29 3b 0d 20 20 20 20 7b | 2a 2a 0d 20 20 20 20 20 |);. {|**. |
|00002610| 20 20 20 47 72 61 62 20 | 74 68 65 20 70 72 69 6e | Grab |the prin|
|00002620| 74 69 6e 67 20 65 72 72 | 6f 72 20 2d 2d 20 6f 6e |ting err|or -- on|
|00002630| 63 65 20 79 6f 75 20 63 | 6c 6f 73 65 20 74 68 65 |ce you c|lose the|
|00002640| 20 50 72 69 6e 74 69 6e | 67 20 4d 61 6e 61 67 65 | Printin|g Manage|
|00002650| 72 2c 20 50 72 45 72 72 | 6f 72 20 64 6f 65 73 6e |r, PrErr|or doesn|
|00002660| 27 74 20 72 65 74 75 72 | 6e 0d 20 20 20 20 20 20 |'t retur|n. |
|00002670| 20 20 61 20 76 61 6c 69 | 64 20 72 65 73 75 6c 74 | a vali|d result|
|00002680| 20 61 6e 79 6d 6f 72 65 | 2e 0d 20 20 20 20 20 2a | anymore|.. *|
|00002690| 2a 7d 0d 20 20 20 20 50 | 72 69 6e 74 45 72 72 6f |*}. P|rintErro|
|000026a0| 72 20 3a 3d 20 50 72 45 | 72 72 6f 72 3b 0d 20 20 |r := PrE|rror;. |
|000026b0| 20 20 50 72 43 6c 6f 73 | 65 3b 0d 20 20 20 20 7b | PrClos|e;. {|
|000026c0| 2a 2a 0d 20 20 20 20 20 | 20 20 20 59 6f 75 20 64 |**. | You d|
|000026d0| 6f 20 6e 6f 74 20 77 61 | 6e 74 20 74 6f 20 72 65 |o not wa|nt to re|
|000026e0| 70 6f 72 74 20 61 6e 79 | 20 70 72 69 6e 74 69 6e |port any| printin|
|000026f0| 67 20 65 72 72 6f 72 73 | 20 75 6e 74 69 6c 20 79 |g errors| until y|
|00002700| 6f 75 20 68 61 76 65 20 | 66 61 6c 6c 65 6e 0d 20 |ou have |fallen. |
|00002710| 20 20 20 20 20 20 20 74 | 68 72 6f 75 67 68 20 74 | t|hrough t|
|00002720| 68 65 20 70 72 69 6e 74 | 69 6e 67 20 6c 6f 6f 70 |he print|ing loop|
|00002730| 2e 20 54 68 69 73 20 77 | 69 6c 6c 20 6d 61 6b 65 |. This w|ill make|
|00002740| 20 73 75 72 65 20 74 68 | 61 74 20 41 4c 4c 20 6f | sure th|at ALL o|
|00002750| 66 20 74 68 65 20 50 72 | 69 6e 74 0d 20 20 20 20 |f the Pr|int. |
|00002760| 20 20 20 20 4d 61 6e 61 | 67 65 72 27 73 20 6f 70 | Mana|ger's op|
|00002770| 65 6e 20 63 61 6c 6c 73 | 20 68 61 76 65 20 74 68 |en calls| have th|
|00002780| 65 69 72 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |eir corr|espondin|
|00002790| 67 20 63 6c 6f 73 65 20 | 63 61 6c 6c 73 2c 20 74 |g close |calls, t|
|000027a0| 68 65 72 65 62 79 0d 20 | 20 20 20 20 20 20 20 65 |hereby. | e|
|000027b0| 6e 61 62 6c 69 6e 67 20 | 74 68 65 20 50 72 69 6e |nabling |the Prin|
|000027c0| 74 20 4d 61 6e 61 67 65 | 72 20 74 6f 20 63 6c 6f |t Manage|r to clo|
|000027d0| 73 65 20 70 72 6f 70 65 | 72 6c 79 20 61 6e 64 20 |se prope|rly and |
|000027e0| 74 68 61 74 20 61 6c 6c | 20 74 65 6d 70 6f 72 61 |that all| tempora|
|000027f0| 72 79 0d 20 20 20 20 20 | 20 20 20 6d 65 6d 6f 72 |ry. | memor|
|00002800| 79 20 61 6c 6c 6f 63 61 | 74 69 6f 6e 73 20 61 72 |y alloca|tions ar|
|00002810| 65 20 72 65 6c 65 61 73 | 65 64 2e 0d 20 20 20 20 |e releas|ed.. |
|00002820| 20 2a 2a 7d 0d 20 20 20 | 20 49 46 20 28 50 72 69 | **}. | IF (Pri|
|00002830| 6e 74 45 72 72 6f 72 20 | 3c 3e 20 6e 6f 45 72 72 |ntError |<> noErr|
|00002840| 29 20 54 48 45 4e 0d 20 | 20 20 20 20 20 50 6f 73 |) THEN. | Pos|
|00002850| 74 50 72 69 6e 74 69 6e | 67 45 72 72 6f 72 73 20 |tPrintin|gErrors |
|00002860| 28 50 72 69 6e 74 45 72 | 72 6f 72 29 3b 0d 20 20 |(PrintEr|ror);. |
|00002870| 20 20 45 4e 44 3b 0d 20 | 20 49 46 20 28 74 68 65 | END;. | IF (the|
|00002880| 50 72 52 65 63 48 64 6c | 20 3c 3e 20 4e 49 4c 29 |PrRecHdl| <> NIL)|
|00002890| 20 54 48 45 4e 20 0d 20 | 20 20 20 44 69 73 70 6f | THEN . | Dispo|
|000028a0| 73 48 61 6e 64 6c 65 28 | 48 61 6e 64 6c 65 20 28 |sHandle(|Handle (|
|000028b0| 74 68 65 50 72 52 65 63 | 48 64 6c 29 29 3b 0d 20 |thePrRec|Hdl));. |
|000028c0| 20 49 46 20 28 50 72 69 | 6e 74 69 6e 67 53 74 61 | IF (Pri|ntingSta|
|000028d0| 74 75 73 44 69 61 6c 6f | 67 20 3c 3e 20 4e 49 4c |tusDialo|g <> NIL|
|000028e0| 29 20 54 48 45 4e 20 0d | 20 20 20 20 44 69 73 70 |) THEN .| Disp|
|000028f0| 6f 73 44 69 61 6c 6f 67 | 28 50 72 69 6e 74 69 6e |osDialog|(Printin|
|00002900| 67 53 74 61 74 75 73 44 | 69 61 6c 6f 67 29 3b 0d |gStatusD|ialog);.|
|00002910| 20 20 53 65 74 50 6f 72 | 74 28 6f 6c 64 50 6f 72 | SetPor|t(oldPor|
|00002920| 74 29 3b 0d 45 4e 44 3b | 20 20 7b 2a 2a 20 20 50 |t);.END;| {** P|
|00002930| 72 69 6e 74 53 74 75 66 | 66 20 20 2a 2a 7d 0d 4d |rintStuf|f **}.M|
|00002940| 50 57 20 43 0d 2f 2a 2d | 2d 2d 2d 2d 2d 20 50 72 |PW C./*-|----- Pr|
|00002950| 69 6e 74 53 74 75 66 66 | 20 2d 2d 2d 2d 2d 2d 2d |intStuff| -------|
|00002960| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002970| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002980| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002990| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 20 2a 2a 0d |--------|-*/. **.|
|000029a0| 20 2a 2a 20 20 20 20 50 | 72 69 6e 74 53 74 75 66 | ** P|rintStuf|
|000029b0| 66 20 77 69 6c 6c 20 63 | 61 6c 6c 20 61 6c 6c 20 |f will c|all all |
|000029c0| 6f 66 20 74 68 65 20 6e | 65 63 65 73 73 61 72 79 |of the n|ecessary|
|000029d0| 20 50 72 69 6e 74 20 4d | 61 6e 61 67 65 72 20 63 | Print M|anager c|
|000029e0| 61 6c 6c 73 20 74 6f 20 | 70 72 69 6e 74 0d 20 2a |alls to |print. *|
|000029f0| 2a 20 20 20 20 61 20 64 | 6f 63 75 6d 65 6e 74 2e |* a d|ocument.|
|00002a00| 20 49 74 20 63 68 65 63 | 6b 73 20 50 72 45 72 72 | It chec|ks PrErr|
|00002a10| 6f 72 28 29 20 61 66 74 | 65 72 20 65 61 63 68 20 |or() aft|er each |
|00002a20| 50 72 69 6e 74 20 4d 61 | 6e 61 67 65 72 20 63 61 |Print Ma|nager ca|
|00002a30| 6c 6c 2e 20 49 66 20 61 | 6e 20 65 72 72 6f 72 0d |ll. If a|n error.|
|00002a40| 20 2a 2a 20 20 20 20 69 | 73 20 66 6f 75 6e 64 2c | ** i|s found,|
|00002a50| 20 61 6c 6c 20 6f 66 20 | 74 68 65 20 50 72 69 6e | all of |the Prin|
|00002a60| 74 20 4d 61 6e 61 67 65 | 72 20 6f 70 65 6e 20 63 |t Manage|r open c|
|00002a70| 61 6c 6c 73 20 28 69 2e | 65 2e 2c 20 50 72 4f 70 |alls (i.|e., PrOp|
|00002a80| 65 6e 2c 20 50 72 4f 70 | 65 6e 44 6f 63 2e 2e 2e |en, PrOp|enDoc...|
|00002a90| 29 0d 20 2a 2a 20 20 20 | 20 77 69 6c 6c 20 68 61 |). ** | will ha|
|00002aa0| 76 65 20 61 20 63 6f 72 | 72 65 73 70 6f 6e 64 69 |ve a cor|respondi|
|00002ab0| 6e 67 20 63 6c 6f 73 65 | 20 63 61 6c 6c 20 62 65 |ng close| call be|
|00002ac0| 66 6f 72 65 20 74 68 65 | 20 65 72 72 6f 72 20 69 |fore the| error i|
|00002ad0| 73 20 70 6f 73 74 65 64 | 20 74 6f 20 74 68 65 20 |s posted| to the |
|00002ae0| 75 73 65 72 2e 0d 20 2a | 2a 20 20 20 20 59 6f 75 |user.. *|* You|
|00002af0| 20 77 61 6e 74 20 74 6f | 20 75 73 65 20 74 68 69 | want to| use thi|
|00002b00| 73 20 61 70 70 72 6f 61 | 63 68 20 74 6f 20 6d 61 |s approa|ch to ma|
|00002b10| 6b 65 20 73 75 72 65 20 | 74 68 65 20 50 72 69 6e |ke sure |the Prin|
|00002b20| 74 20 4d 61 6e 61 67 65 | 72 20 63 6c 6f 73 65 73 |t Manage|r closes|
|00002b30| 20 70 72 6f 70 65 72 6c | 79 0d 20 2a 2a 20 20 20 | properl|y. ** |
|00002b40| 20 61 6e 64 20 61 6c 6c | 20 74 65 6d 70 6f 72 61 | and all| tempora|
|00002b50| 72 79 20 6d 65 6d 6f 72 | 79 20 69 73 20 72 65 6c |ry memor|y is rel|
|00002b60| 65 61 73 65 64 2e 0d 20 | 2a 2a 2f 0d 76 6f 69 64 |eased.. |**/.void|
|00002b70| 20 50 72 69 6e 74 53 74 | 75 66 66 20 28 29 0d 7b | PrintSt|uff ().{|
|00002b80| 0d 20 20 47 72 61 66 50 | 74 72 20 20 20 20 20 20 |. GrafP|tr |
|00002b90| 6f 6c 64 50 6f 72 74 3b | 0d 20 20 73 68 6f 72 74 |oldPort;|. short|
|00002ba0| 20 20 20 20 20 20 20 20 | 63 6f 70 69 65 73 2c 0d | |copies,.|
|00002bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 66 | | f|
|00002bc0| 69 72 73 74 50 61 67 65 | 2c 0d 20 20 20 20 20 20 |irstPage|,. |
|00002bd0| 20 20 20 20 20 20 20 20 | 20 6c 61 73 74 50 61 67 | | lastPag|
|00002be0| 65 2c 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e,. | |
|00002bf0| 20 20 6e 75 6d 62 65 72 | 4f 66 43 6f 70 69 65 73 | number|OfCopies|
|00002c00| 2c 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,. | |
|00002c10| 20 70 72 69 6e 74 6d 67 | 72 73 52 65 73 46 69 6c | printmg|rsResFil|
|00002c20| 65 2c 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e,. | |
|00002c30| 20 20 72 65 61 6c 4e 75 | 6d 62 65 72 4f 66 50 61 | realNu|mberOfPa|
|00002c40| 67 65 73 69 6e 44 6f 63 | 2c 0d 20 20 20 20 20 20 |gesinDoc|,. |
|00002c50| 20 20 20 20 20 20 20 20 | 20 70 61 67 65 4e 75 6d | | pageNum|
|00002c60| 62 65 72 2c 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ber,. | |
|00002c70| 20 20 20 20 50 72 69 6e | 74 45 72 72 6f 72 3b 0d | Prin|tError;.|
|00002c80| 20 20 54 48 50 72 69 6e | 74 20 20 20 20 20 20 74 | THPrin|t t|
|00002c90| 68 65 50 72 52 65 63 48 | 64 6c 3b 0d 20 20 54 50 |hePrRecH|dl;. TP|
|00002ca0| 50 72 50 6f 72 74 20 20 | 20 20 20 74 68 65 50 72 |PrPort | thePr|
|00002cb0| 50 6f 72 74 3b 0d 20 20 | 54 50 72 53 74 61 74 75 |Port;. |TPrStatu|
|00002cc0| 73 20 20 20 20 74 68 65 | 53 74 61 74 75 73 3b 0d |s the|Status;.|
|00002cd0| 20 20 47 65 74 50 6f 72 | 74 28 26 6f 6c 64 50 6f | GetPor|t(&oldPo|
|00002ce0| 72 74 29 3b 0d 20 2f 2a | 2a 0d 20 20 20 20 20 55 |rt);. /*|*. U|
|00002cf0| 6e 4c 6f 61 64 54 68 65 | 57 6f 72 6c 64 20 77 69 |nLoadThe|World wi|
|00002d00| 6c 6c 20 73 77 61 70 20 | 6f 75 74 20 41 4c 4c 20 |ll swap |out ALL |
|00002d10| 75 6e 6e 65 65 64 65 64 | 20 63 6f 64 65 20 73 65 |unneeded| code se|
|00002d20| 67 6d 65 6e 74 73 20 61 | 6e 64 20 64 61 74 61 20 |gments a|nd data |
|00002d30| 74 68 61 74 0d 20 20 20 | 20 20 61 72 65 20 4e 4f |that. | are NO|
|00002d40| 54 20 72 65 71 75 69 72 | 65 64 20 64 75 72 69 6e |T requir|ed durin|
|00002d50| 67 20 70 72 69 6e 74 20 | 74 69 6d 65 2e 20 59 6f |g print |time. Yo|
|00002d60| 75 72 20 70 72 69 6e 74 | 20 63 6f 64 65 20 6d 75 |ur print| code mu|
|00002d70| 73 74 20 62 65 20 61 20 | 73 65 70 61 72 61 74 65 |st be a |separate|
|00002d80| 0d 20 20 20 20 20 63 6f | 64 65 20 73 65 67 6d 65 |. co|de segme|
|00002d90| 6e 74 2e 0d 20 20 2a 2a | 2f 0d 20 20 55 6e 4c 6f |nt.. **|/. UnLo|
|00002da0| 61 64 54 68 65 57 6f 72 | 6c 64 20 28 29 3b 0d 20 |adTheWor|ld ();. |
|00002db0| 20 74 68 65 50 72 52 65 | 63 48 64 6c 20 3d 20 28 | thePrRe|cHdl = (|
|00002dc0| 54 48 50 72 69 6e 74 29 | 20 20 4e 65 77 48 61 6e |THPrint)| NewHan|
|00002dd0| 64 6c 65 20 28 73 69 7a | 65 6f 66 20 28 54 50 72 |dle (siz|eof (TPr|
|00002de0| 69 6e 74 29 29 3b 0d 20 | 2f 2a 2a 0d 20 20 20 20 |int));. |/**. |
|00002df0| 20 43 68 65 63 6b 20 74 | 6f 20 6d 61 6b 65 20 73 | Check t|o make s|
|00002e00| 75 72 65 20 74 68 61 74 | 20 74 68 65 20 6d 65 6d |ure that| the mem|
|00002e10| 6f 72 79 20 6d 61 6e 61 | 67 65 72 20 64 69 64 20 |ory mana|ger did |
|00002e20| 6e 6f 74 20 70 72 6f 64 | 75 63 65 20 61 6e 20 65 |not prod|uce an e|
|00002e30| 72 72 6f 72 0d 20 20 20 | 20 20 77 68 65 6e 20 69 |rror. | when i|
|00002e40| 74 20 61 6c 6c 6f 63 61 | 74 65 64 20 74 68 65 20 |t alloca|ted the |
|00002e50| 70 72 69 6e 74 20 72 65 | 63 6f 72 64 20 68 61 6e |print re|cord han|
|00002e60| 64 6c 65 20 61 6e 64 20 | 6d 61 6b 65 20 73 75 72 |dle and |make sur|
|00002e70| 65 20 69 74 20 64 69 64 | 20 6e 6f 74 20 70 61 73 |e it did| not pas|
|00002e80| 73 0d 20 20 20 20 20 62 | 61 63 6b 20 61 20 6e 69 |s. b|ack a ni|
|00002e90| 6c 20 68 61 6e 64 6c 65 | 2e 0d 20 20 2a 2a 2f 0d |l handle|.. **/.|
|00002ea0| 20 20 69 66 20 28 4d 65 | 6d 45 72 72 6f 72 28 29 | if (Me|mError()|
|00002eb0| 20 3d 3d 20 6e 6f 45 72 | 72 20 26 26 20 74 68 65 | == noEr|r && the|
|00002ec0| 50 72 52 65 63 48 64 6c | 20 21 3d 20 6e 69 6c 29 |PrRecHdl| != nil)|
|00002ed0| 0d 20 20 20 20 7b 0d 20 | 20 20 20 20 20 50 72 4f |. {. | PrO|
|00002ee0| 70 65 6e 28 29 3b 0d 20 | 20 20 20 20 20 69 66 20 |pen();. | if |
|00002ef0| 28 50 72 45 72 72 6f 72 | 28 29 20 3d 3d 20 6e 6f |(PrError|() == no|
|00002f00| 45 72 72 29 0d 20 20 20 | 20 20 20 20 20 7b 0d 20 |Err). | {. |
|00002f10| 20 20 20 20 20 20 20 20 | 2f 2a 2a 0d 20 20 20 20 | |/**. |
|00002f20| 20 20 20 20 20 20 20 20 | 20 20 53 61 76 65 20 74 | | Save t|
|00002f30| 68 65 20 63 75 72 72 65 | 6e 74 20 72 65 73 6f 75 |he curre|nt resou|
|00002f40| 72 63 65 20 66 69 6c 65 | 20 28 69 2e 65 2e 20 74 |rce file| (i.e. t|
|00002f50| 68 65 20 70 72 69 6e 74 | 65 72 20 64 72 69 76 65 |he print|er drive|
|00002f60| 72 27 73 29 20 73 6f 0d | 20 20 20 20 20 20 20 20 |r's) so.| |
|00002f70| 20 20 20 20 20 20 74 68 | 65 20 64 72 69 76 65 72 | th|e driver|
|00002f80| 20 77 69 6c 6c 20 6e 6f | 74 20 6c 6f 73 65 20 69 | will no|t lose i|
|00002f90| 74 73 20 72 65 73 6f 75 | 72 63 65 73 20 75 70 6f |ts resou|rces upo|
|00002fa0| 6e 20 72 65 74 75 72 6e | 20 66 72 6f 6d 20 74 68 |n return| from th|
|00002fb0| 65 20 70 49 64 6c 65 50 | 72 6f 63 2e 0d 20 20 20 |e pIdleP|roc.. |
|00002fc0| 20 20 20 20 20 20 20 2a | 2a 2f 0d 20 20 20 20 20 | *|*/. |
|00002fd0| 20 20 20 20 20 70 72 69 | 6e 74 6d 67 72 73 52 65 | pri|ntmgrsRe|
|00002fe0| 73 46 69 6c 65 20 3d 20 | 43 75 72 52 65 73 46 69 |sFile = |CurResFi|
|00002ff0| 6c 65 28 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |le();. | |
|00003000| 50 72 69 6e 74 44 65 66 | 61 75 6c 74 28 74 68 65 |PrintDef|ault(the|
|00003010| 50 72 52 65 63 48 64 6c | 29 3b 0d 20 20 20 20 20 |PrRecHdl|);. |
|00003020| 20 20 20 20 20 69 66 20 | 28 50 72 45 72 72 6f 72 | if |(PrError|
|00003030| 28 29 20 3d 3d 20 6e 6f | 45 72 72 29 0d 20 20 20 |() == no|Err). |
|00003040| 20 20 20 20 20 20 20 20 | 20 7b 0d 20 20 20 20 20 | | {. |
|00003050| 20 20 20 20 20 20 20 20 | 20 69 66 20 28 50 72 53 | | if (PrS|
|00003060| 74 6c 44 69 61 6c 6f 67 | 28 74 68 65 50 72 52 65 |tlDialog|(thePrRe|
|00003070| 63 48 64 6c 29 29 0d 20 | 20 20 20 20 20 20 20 20 |cHdl)). | |
|00003080| 20 20 20 20 20 20 20 7b | 0d 20 20 20 20 20 20 20 | {|. |
|00003090| 20 20 20 20 20 20 20 20 | 20 20 2f 2a 2a 0d 20 20 | | /**. |
|000030a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000030b0| 20 20 20 44 65 74 65 72 | 6d 69 6e 65 4e 75 6d 62 | Deter|mineNumb|
|000030c0| 65 72 4f 66 50 61 67 65 | 73 69 6e 44 6f 63 20 64 |erOfPage|sinDoc d|
|000030d0| 65 74 65 72 6d 69 6e 65 | 73 20 74 68 65 20 6e 75 |etermine|s the nu|
|000030e0| 6d 62 65 72 20 6f 66 20 | 70 61 67 65 73 0d 20 20 |mber of |pages. |
|000030f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003100| 20 20 20 63 6f 6e 74 61 | 69 6e 65 64 20 69 6e 20 | conta|ined in |
|00003110| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 20 62 79 20 |the docu|ment by |
|00003120| 63 6f 6d 70 61 72 69 6e | 67 20 74 68 65 20 73 69 |comparin|g the si|
|00003130| 7a 65 20 6f 66 20 74 68 | 65 20 64 6f 63 75 6d 65 |ze of th|e docume|
|00003140| 6e 74 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |nt. | |
|00003150| 20 20 20 20 20 20 20 20 | 77 69 74 68 20 72 50 61 | |with rPa|
|00003160| 67 65 20 66 72 6f 6d 20 | 74 68 65 20 54 50 72 49 |ge from |the TPrI|
|00003170| 6e 66 6f 20 72 65 63 6f | 72 64 20 28 49 4d 20 49 |nfo reco|rd (IM I|
|00003180| 49 2d 31 35 30 29 2e 20 | 49 74 20 72 65 74 75 72 |I-150). |It retur|
|00003190| 6e 73 20 74 68 65 0d 20 | 20 20 20 20 20 20 20 20 |ns the. | |
|000031a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6e 75 6d 62 | | numb|
|000031b0| 65 72 20 6f 66 20 70 61 | 67 65 73 20 72 65 71 75 |er of pa|ges requ|
|000031c0| 69 72 65 64 20 74 6f 20 | 70 72 69 6e 74 20 74 68 |ired to |print th|
|000031d0| 65 20 64 6f 63 75 6d 65 | 6e 74 20 66 6f 72 20 74 |e docume|nt for t|
|000031e0| 68 65 20 09 09 09 20 20 | 20 20 20 20 20 20 20 20 |he ... | |
|000031f0| 20 20 20 63 75 72 72 65 | 6e 74 6c 79 20 73 65 6c | curre|ntly sel|
|00003200| 65 63 74 65 64 20 70 72 | 69 6e 74 65 72 2e 0d 20 |ected pr|inter.. |
|00003210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003220| 20 2a 2a 2f 0d 20 20 20 | 20 20 20 20 20 20 20 20 | **/. | |
|00003230| 20 20 20 20 20 20 20 72 | 65 61 6c 4e 75 6d 62 65 | r|ealNumbe|
|00003240| 72 4f 66 50 61 67 65 73 | 69 6e 44 6f 63 20 3d 20 |rOfPages|inDoc = |
|00003250| 44 65 74 65 72 6d 69 6e | 65 4e 75 6d 62 65 72 4f |Determin|eNumberO|
|00003260| 66 50 61 67 65 73 69 6e | 44 6f 63 0d 20 20 20 20 |fPagesin|Doc. |
|00003270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003290| 20 20 20 20 20 20 20 20 | 20 28 28 2a 2a 74 68 65 | | ((**the|
|000032a0| 50 72 52 65 63 48 64 6c | 29 2e 70 72 49 6e 66 6f |PrRecHdl|).prInfo|
|000032b0| 2e 72 50 61 67 65 29 3b | 0d 20 20 20 20 20 20 20 |.rPage);|. |
|000032c0| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 50 | | if (P|
|000032d0| 72 4a 6f 62 44 69 61 6c | 6f 67 28 74 68 65 50 72 |rJobDial|og(thePr|
|000032e0| 52 65 63 48 64 6c 29 29 | 20 0d 20 20 20 20 20 20 |RecHdl))| . |
|000032f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 0d | | {.|
|00003300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003310| 20 20 20 20 20 2f 2a 2a | 0d 20 20 20 20 20 20 20 | /**|. |
|00003320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003330| 20 20 20 47 65 74 20 74 | 68 65 20 6e 75 6d 62 65 | Get t|he numbe|
|00003340| 72 20 6f 66 20 63 6f 70 | 69 65 73 20 6f 66 20 74 |r of cop|ies of t|
|00003350| 68 65 20 64 6f 63 75 6d | 65 6e 74 20 74 68 61 74 |he docum|ent that|
|00003360| 20 74 68 65 20 75 73 65 | 72 20 0d 20 20 20 20 20 | the use|r . |
|00003370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003380| 20 20 20 20 20 77 61 6e | 74 73 20 70 72 69 6e 74 | wan|ts print|
|00003390| 65 64 20 66 72 6f 6d 20 | 69 43 6f 70 69 65 73 20 |ed from |iCopies |
|000033a0| 6f 66 20 74 68 65 20 54 | 50 72 4a 6f 62 20 72 65 |of the T|PrJob re|
|000033b0| 63 6f 72 64 20 28 49 4d | 20 49 49 2d 31 35 31 29 |cord (IM| II-151)|
|000033c0| 2e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|000033d0| 20 20 20 20 20 20 20 20 | 2a 2a 2f 0d 20 20 20 20 | |**/. |
|000033e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033f0| 20 20 6e 75 6d 62 65 72 | 4f 66 43 6f 70 69 65 73 | number|OfCopies|
|00003400| 20 3d 20 28 2a 2a 74 68 | 65 50 72 52 65 63 48 64 | = (**th|ePrRecHd|
|00003410| 6c 29 2e 70 72 4a 6f 62 | 2e 69 43 6f 70 69 65 73 |l).prJob|.iCopies|
|00003420| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00003430| 20 20 20 20 20 20 20 20 | 20 2f 2a 2a 0d 20 20 20 | | /**. |
|00003440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003450| 20 20 20 20 20 20 20 20 | 47 65 74 20 74 68 65 20 | |Get the |
|00003460| 66 69 72 73 74 20 61 6e | 64 20 6c 61 73 74 20 70 |first an|d last p|
|00003470| 61 67 65 73 20 6f 66 20 | 74 68 65 20 64 6f 63 75 |ages of |the docu|
|00003480| 6d 65 6e 74 20 74 68 61 | 74 0d 20 20 20 20 20 20 |ment tha|t. |
|00003490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034a0| 20 20 20 20 20 77 65 72 | 65 20 72 65 71 75 65 73 | wer|e reques|
|000034b0| 74 65 64 20 74 6f 20 62 | 65 20 70 72 69 6e 74 65 |ted to b|e printe|
|000034c0| 64 20 62 79 20 74 68 65 | 20 75 73 65 72 20 66 72 |d by the| user fr|
|000034d0| 6f 6d 20 69 46 73 74 50 | 61 67 65 0d 20 20 20 20 |om iFstP|age. |
|000034e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034f0| 20 20 20 20 20 20 20 61 | 6e 64 20 69 4c 61 73 74 | a|nd iLast|
|00003500| 50 61 67 65 20 66 72 6f | 6d 20 74 68 65 20 54 50 |Page fro|m the TP|
|00003510| 72 4a 6f 62 20 72 65 63 | 6f 72 64 20 28 49 4d 20 |rJob rec|ord (IM |
|00003520| 49 49 2d 31 35 31 29 2e | 0d 20 20 20 20 20 20 20 |II-151).|. |
|00003530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003540| 20 2a 2a 2f 0d 20 20 20 | 20 20 20 20 20 20 20 20 | **/. | |
|00003550| 20 20 20 20 20 20 20 20 | 20 20 20 66 69 72 73 74 | | first|
|00003560| 50 61 67 65 20 3d 20 28 | 2a 2a 74 68 65 50 72 52 |Page = (|**thePrR|
|00003570| 65 63 48 64 6c 29 2e 70 | 72 4a 6f 62 2e 69 46 73 |ecHdl).p|rJob.iFs|
|00003580| 74 50 61 67 65 3b 0d 20 | 20 20 20 20 20 20 20 20 |tPage;. | |
|00003590| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6c 61 73 | | las|
|000035a0| 74 50 61 67 65 20 3d 20 | 28 2a 2a 74 68 65 50 72 |tPage = |(**thePr|
|000035b0| 52 65 63 48 64 6c 29 2e | 70 72 4a 6f 62 2e 69 4c |RecHdl).|prJob.iL|
|000035c0| 73 74 50 61 67 65 3b 0d | 20 20 20 20 20 20 20 20 |stPage;.| |
|000035d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|000035e0| 2a 2a 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |**. | |
|000035f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 50 72 | | Pr|
|00003600| 69 6e 74 20 22 61 6c 6c | 22 20 70 61 67 65 73 20 |int "all|" pages |
|00003610| 69 6e 20 74 68 65 20 70 | 72 69 6e 74 20 6c 6f 6f |in the p|rint loo|
|00003620| 70 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p. | |
|00003630| 20 20 20 20 20 20 20 20 | 20 20 2a 2a 2f 0d 20 20 | | **/. |
|00003640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003650| 20 20 20 20 28 2a 2a 74 | 68 65 50 72 52 65 63 48 | (**t|hePrRecH|
|00003660| 64 6c 29 2e 70 72 4a 6f | 62 2e 69 46 73 74 50 61 |dl).prJo|b.iFstPa|
|00003670| 67 65 20 3d 20 31 3b 0d | 20 20 20 20 20 20 20 20 |ge = 1;.| |
|00003680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 28 2a | | (*|
|00003690| 2a 74 68 65 50 72 52 65 | 63 48 64 6c 29 2e 70 72 |*thePrRe|cHdl).pr|
|000036a0| 4a 6f 62 2e 69 4c 73 74 | 50 61 67 65 20 3d 20 39 |Job.iLst|Page = 9|
|000036b0| 39 39 39 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |999;. | |
|000036c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 2a 0d | | /**.|
|000036d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000036e0| 20 20 20 20 20 20 20 20 | 20 20 20 44 65 74 65 72 | | Deter|
|000036f0| 6d 69 6e 65 20 74 68 65 | 20 22 72 65 61 6c 22 20 |mine the| "real" |
|00003700| 6e 75 6d 62 65 72 20 6f | 66 20 70 61 67 65 73 20 |number o|f pages |
|00003710| 63 6f 6e 74 61 69 6e 65 | 64 20 69 6e 20 74 68 65 |containe|d in the|
|00003720| 20 09 09 09 20 20 20 20 | 20 20 20 20 20 20 20 64 | ... | d|
|00003730| 6f 63 75 6d 65 6e 74 2e | 20 57 69 74 68 6f 75 74 |ocument.| Without|
|00003740| 20 74 68 69 73 20 74 65 | 73 74 2c 20 79 6f 75 20 | this te|st, you |
|00003750| 77 6f 75 6c 64 20 70 72 | 69 6e 74 20 39 39 39 39 |would pr|int 9999|
|00003760| 20 70 61 67 65 73 2e 0d | 20 20 20 20 20 20 20 20 | pages..| |
|00003770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003780| 2a 2a 2f 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |**/. | |
|00003790| 20 20 20 20 20 20 20 20 | 20 20 69 66 20 28 72 65 | | if (re|
|000037a0| 61 6c 4e 75 6d 62 65 72 | 4f 66 50 61 67 65 73 69 |alNumber|OfPagesi|
|000037b0| 6e 44 6f 63 20 3c 20 6c | 61 73 74 50 61 67 65 29 |nDoc < l|astPage)|
|000037c0| 20 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|000037d0| 20 20 20 20 20 20 20 20 | 20 20 6c 61 73 74 50 61 | | lastPa|
|000037e0| 67 65 20 3d 20 72 65 61 | 6c 4e 75 6d 62 65 72 4f |ge = rea|lNumberO|
|000037f0| 66 50 61 67 65 73 69 6e | 44 6f 63 3b 0d 20 20 20 |fPagesin|Doc;. |
|00003800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003810| 20 20 20 50 72 69 6e 74 | 69 6e 67 53 74 61 74 75 | Print|ingStatu|
|00003820| 73 44 69 61 6c 6f 67 20 | 3d 20 47 65 74 4e 65 77 |sDialog |= GetNew|
|00003830| 44 69 61 6c 6f 67 28 32 | 35 37 2c 20 6e 69 6c 2c |Dialog(2|57, nil,|
|00003840| 20 28 57 69 6e 64 6f 77 | 50 74 72 29 20 2d 31 29 | (Window|Ptr) -1)|
|00003850| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00003860| 20 20 20 20 20 20 20 20 | 20 2f 2a 2a 0d 20 20 20 | | /**. |
|00003870| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003880| 20 20 20 20 20 20 20 20 | 50 72 69 6e 74 20 74 68 | |Print th|
|00003890| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 6f 70 69 |e number| of copi|
|000038a0| 65 73 20 6f 66 20 74 68 | 65 20 64 6f 63 75 6d 65 |es of th|e docume|
|000038b0| 6e 74 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |nt. | |
|000038c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 | | re|
|000038d0| 71 75 65 73 74 65 64 20 | 62 79 20 74 68 65 20 75 |quested |by the u|
|000038e0| 73 65 72 20 66 72 6f 6d | 20 74 68 65 20 50 72 69 |ser from| the Pri|
|000038f0| 6e 74 20 4a 6f 62 20 44 | 69 61 6c 6f 67 2e 0d 20 |nt Job D|ialog.. |
|00003900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003910| 20 20 20 20 20 20 20 2a | 2a 2f 0d 20 20 20 20 20 | *|*/. |
|00003920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003930| 20 66 6f 72 20 28 63 6f | 70 69 65 73 20 3d 20 31 | for (co|pies = 1|
|00003940| 3b 20 63 6f 70 69 65 73 | 20 3c 3d 20 6e 75 6d 62 |; copies| <= numb|
|00003950| 65 72 4f 66 43 6f 70 69 | 65 73 3b 20 63 6f 70 69 |erOfCopi|es; copi|
|00003960| 65 73 2b 2b 29 0d 20 20 | 20 20 20 20 20 20 20 20 |es++). | |
|00003970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 0d | | {.|
|00003980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003990| 20 20 20 20 20 20 20 20 | 20 2f 2a 2a 0d 20 20 20 | | /**. |
|000039a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000039b0| 20 20 20 20 20 20 20 20 | 20 20 49 6e 73 74 61 6c | | Instal|
|000039c0| 6c 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 79 |l a poin|ter to y|
|000039d0| 6f 75 72 20 70 49 64 6c | 65 20 70 72 6f 63 20 69 |our pIdl|e proc i|
|000039e0| 6e 20 6d 79 20 70 72 69 | 6e 74 20 72 65 63 6f 72 |n my pri|nt recor|
|000039f0| 64 2e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d.. | |
|00003a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2a 2a 2f | | **/|
|00003a10| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003a20| 20 20 20 20 20 20 20 20 | 20 20 20 28 2a 2a 74 68 | | (**th|
|00003a30| 65 50 72 52 65 63 48 64 | 6c 29 2e 70 72 4a 6f 62 |ePrRecHd|l).prJob|
|00003a40| 2e 70 49 64 6c 65 50 72 | 6f 63 20 3d 20 63 68 65 |.pIdlePr|oc = che|
|00003a50| 63 6b 4d 79 50 72 69 6e | 74 44 69 61 6c 6f 67 42 |ckMyPrin|tDialogB|
|00003a60| 75 74 74 6f 6e 3b 0d 20 | 20 20 20 20 20 20 20 20 |utton;. | |
|00003a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003a80| 2f 2a 2a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |/**. | |
|00003a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003aa0| 20 52 65 73 74 6f 72 65 | 20 74 68 65 20 72 65 73 | Restore| the res|
|00003ab0| 6f 75 72 63 65 20 66 69 | 6c 65 20 74 6f 20 74 68 |ource fi|le to th|
|00003ac0| 65 20 70 72 69 6e 74 65 | 72 20 64 72 69 76 65 72 |e printe|r driver|
|00003ad0| 27 73 2e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |'s.. | |
|00003ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2a 2a | | **|
|00003af0| 2f 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |/. | |
|00003b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 55 73 65 52 | | UseR|
|00003b10| 65 73 46 69 6c 65 28 70 | 72 69 6e 74 6d 67 72 73 |esFile(p|rintmgrs|
|00003b20| 52 65 73 46 69 6c 65 29 | 3b 0d 20 20 20 20 20 20 |ResFile)|;. |
|00003b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b40| 20 20 20 20 74 68 65 50 | 72 50 6f 72 74 20 3d 20 | theP|rPort = |
|00003b50| 50 72 4f 70 65 6e 44 6f | 63 28 74 68 65 50 72 52 |PrOpenDo|c(thePrR|
|00003b60| 65 63 48 64 6c 2c 20 6e | 69 6c 2c 20 6e 69 6c 29 |ecHdl, n|il, nil)|
|00003b70| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00003b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 66 20 28 | | if (|
|00003b90| 50 72 45 72 72 6f 72 28 | 29 20 3d 3d 20 6e 6f 45 |PrError(|) == noE|
|00003ba0| 72 72 29 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |rr). | |
|00003bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003bc0| 7b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{. | |
|00003bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|00003be0| 2a 2a 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |**. | |
|00003bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c00| 20 20 20 20 50 72 69 6e | 74 20 74 68 65 20 72 61 | Prin|t the ra|
|00003c10| 6e 67 65 20 6f 66 20 70 | 61 67 65 73 20 6f 66 20 |nge of p|ages of |
|00003c20| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 20 0d 20 20 |the docu|ment . |
|00003c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 72 | | r|
|00003c50| 65 71 75 65 73 74 65 64 | 20 62 79 20 74 68 65 20 |equested| by the |
|00003c60| 75 73 65 72 20 66 72 6f | 6d 20 74 68 65 20 50 72 |user fro|m the Pr|
|00003c70| 69 6e 74 20 4a 6f 62 20 | 44 69 61 6c 6f 67 2e 0d |int Job |Dialog..|
|00003c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2a 2a | | **|
|00003ca0| 2f 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |/. | |
|00003cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003cc0| 70 61 67 65 4e 75 6d 62 | 65 72 20 3d 20 66 69 72 |pageNumb|er = fir|
|00003cd0| 73 74 50 61 67 65 3b 0d | 20 20 20 20 20 20 20 20 |stPage;.| |
|00003ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003cf0| 20 20 20 20 20 20 77 68 | 69 6c 65 20 28 70 61 67 | wh|ile (pag|
|00003d00| 65 4e 75 6d 62 65 72 20 | 3c 3d 20 6c 61 73 74 50 |eNumber |<= lastP|
|00003d10| 61 67 65 20 26 26 20 50 | 72 45 72 72 6f 72 28 29 |age && P|rError()|
|00003d20| 20 3d 3d 20 6e 6f 45 72 | 72 29 0d 20 20 20 20 20 | == noEr|r). |
|00003d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d40| 20 20 20 20 20 20 20 20 | 20 20 20 7b 0d 20 20 20 | | {. |
|00003d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 0d | | .|
|00003d70| 09 09 09 09 20 20 20 20 | 20 2f 2a 2a 0d 09 09 09 |.... | /**....|
|00003d80| 09 09 20 20 20 49 66 20 | 77 65 27 76 65 20 63 72 |.. If |we've cr|
|00003d90| 6f 73 73 65 64 20 61 20 | 31 32 38 2d 70 61 67 65 |ossed a |128-page|
|00003da0| 20 62 6f 75 6e 64 61 72 | 79 2c 0d 09 09 09 09 09 | boundar|y,......|
|00003db0| 20 20 20 63 6c 6f 73 65 | 20 74 68 65 20 63 75 72 | close| the cur|
|00003dc0| 72 65 6e 74 20 70 72 69 | 6e 74 20 66 69 6c 65 2c |rent pri|nt file,|
|00003dd0| 20 73 65 6e 64 20 69 74 | 0d 09 09 09 09 09 20 20 | send it|...... |
|00003de0| 20 74 6f 20 74 68 65 20 | 70 72 69 6e 74 65 72 20 | to the |printer |
|00003df0| 69 66 20 6e 65 63 65 73 | 73 61 72 79 2c 20 61 6e |if neces|sary, an|
|00003e00| 64 20 6f 70 65 6e 20 61 | 0d 09 09 09 09 09 20 20 |d open a|...... |
|00003e10| 20 6e 65 77 20 64 6f 63 | 75 6d 65 6e 74 2e 0d 09 | new doc|ument...|
|00003e20| 09 09 09 20 20 20 20 20 | 2a 2a 2f 0d 09 09 09 09 |... |**/.....|
|00003e30| 20 20 20 20 20 0d 09 09 | 09 09 20 20 20 20 20 69 | ...|.. i|
|00003e40| 66 20 28 28 70 61 67 65 | 4e 75 6d 62 65 72 20 2d |f ((page|Number -|
|00003e50| 20 66 69 72 73 74 50 61 | 67 65 29 20 25 20 69 50 | firstPa|ge) % iP|
|00003e60| 46 4d 61 78 50 67 73 20 | 3d 3d 20 30 29 0d 09 09 |FMaxPgs |== 0)...|
|00003e70| 09 09 20 20 20 20 20 20 | 20 7b 0d 09 09 09 09 20 |.. | {..... |
|00003e80| 20 20 20 20 20 20 20 20 | 69 66 20 28 70 61 67 65 | |if (page|
|00003e90| 4e 75 6d 62 65 72 20 21 | 3d 20 66 69 72 73 74 50 |Number !|= firstP|
|00003ea0| 61 67 65 29 0d 09 09 09 | 09 20 20 20 20 20 20 20 |age)....|. |
|00003eb0| 20 20 20 20 7b 0d 09 09 | 09 09 20 20 20 20 20 20 | {...|.. |
|00003ec0| 20 20 20 20 20 20 20 50 | 72 43 6c 6f 73 65 44 6f | P|rCloseDo|
|00003ed0| 63 28 74 68 65 50 72 50 | 6f 72 74 29 3b 0d 09 09 |c(thePrP|ort);...|
|00003ee0| 09 09 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 |.. | i|
|00003ef0| 66 20 28 28 28 2a 2a 74 | 68 65 50 72 52 65 63 48 |f (((**t|hePrRecH|
|00003f00| 64 6c 29 2e 70 72 4a 6f | 62 2e 62 4a 44 6f 63 4c |dl).prJo|b.bJDocL|
|00003f10| 6f 6f 70 20 3d 3d 0d 20 | 20 20 20 20 20 20 20 20 |oop ==. | |
|00003f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f40| 20 20 20 20 62 53 70 6f | 6f 6c 4c 6f 6f 70 29 20 | bSpo|olLoop) |
|00003f50| 26 26 20 28 50 72 45 72 | 72 6f 72 28 29 20 3d 3d |&& (PrEr|ror() ==|
|00003f60| 20 6e 6f 45 72 72 29 29 | 0d 20 20 20 20 20 20 20 | noErr))|. |
|00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003f90| 20 20 20 20 20 20 50 72 | 50 69 63 46 69 6c 65 28 | Pr|PicFile(|
|00003fa0| 74 68 65 50 72 52 65 63 | 48 64 6c 2c 20 6e 69 6c |thePrRec|Hdl, nil|
|00003fb0| 2c 20 6e 69 6c 2c 20 6e | 69 6c 2c 0d 20 20 20 20 |, nil, n|il,. |
|00003fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ff0| 20 20 20 26 74 68 65 53 | 74 61 74 75 73 29 3b 0d | &theS|tatus);.|
|00004000| 09 09 09 09 20 20 20 20 | 20 20 20 20 20 20 20 20 |.... | |
|00004010| 20 74 68 65 50 72 50 6f | 72 74 20 3d 20 50 72 4f | thePrPo|rt = PrO|
|00004020| 70 65 6e 44 6f 63 28 74 | 68 65 50 72 52 65 63 48 |penDoc(t|hePrRecH|
|00004030| 64 6c 2c 20 6e 69 6c 2c | 0d 20 20 20 20 20 20 20 |dl, nil,|. |
|00004040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004070| 20 20 20 20 20 20 20 20 | 20 6e 69 6c 29 3b 0d 20 | | nil);. |
|00004080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040a0| 20 20 20 20 20 20 20 20 | 7d 0d 20 20 20 20 20 20 | |}. |
|000040b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000040c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7d | | }|
|000040d0| 09 0d 09 09 09 09 20 20 | 20 20 20 50 72 4f 70 65 |...... | PrOpe|
|000040e0| 6e 50 61 67 65 28 74 68 | 65 50 72 50 6f 72 74 2c |nPage(th|ePrPort,|
|000040f0| 20 6e 69 6c 29 3b 0d 20 | 20 20 20 20 20 20 20 20 | nil);. | |
|00004100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004110| 20 20 20 20 20 20 20 20 | 20 69 66 20 28 50 72 45 | | if (PrE|
|00004120| 72 72 6f 72 28 29 20 3d | 3d 20 6e 6f 45 72 72 29 |rror() =|= noErr)|
|00004130| 20 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00004140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004150| 20 20 20 20 20 20 7b 0d | 20 20 20 20 20 20 20 20 | {.| |
|00004160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 2a | | /**|
|00004180| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004190| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041a0| 20 20 20 20 20 20 20 20 | 20 20 72 50 61 67 65 20 | | rPage |
|000041b0| 28 49 4d 20 49 49 2d 31 | 35 30 29 20 69 73 20 74 |(IM II-1|50) is t|
|000041c0| 68 65 20 70 72 69 6e 74 | 61 62 6c 65 20 61 72 65 |he print|able are|
|000041d0| 61 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |a. | |
|000041e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041f0| 20 20 20 20 20 20 20 20 | 20 20 20 66 6f 72 20 74 | | for t|
|00004200| 68 65 20 63 75 72 72 65 | 6e 74 6c 79 20 73 65 6c |he curre|ntly sel|
|00004210| 65 63 74 65 64 20 70 72 | 69 6e 74 65 72 2e 20 42 |ected pr|inter. B|
|00004220| 79 20 09 09 09 09 09 20 | 20 20 20 20 70 61 73 73 |y ..... | pass|
|00004230| 69 6e 67 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ing the |current |
|00004240| 70 6f 72 74 20 74 6f 20 | 74 68 65 20 64 72 61 77 |port to |the draw|
|00004250| 20 09 09 09 09 09 09 20 | 20 20 20 20 72 6f 75 74 | ...... | rout|
|00004260| 69 6e 65 2c 20 65 6e 61 | 62 6c 65 73 20 79 6f 75 |ine, ena|bles you|
|00004270| 72 20 61 70 70 20 74 6f | 20 75 73 65 20 74 68 65 |r app to| use the|
|00004280| 20 73 61 6d 65 20 09 09 | 09 09 09 20 20 20 20 20 | same ..|... |
|00004290| 72 6f 75 74 69 6e 65 20 | 74 6f 20 64 72 61 77 20 |routine |to draw |
|000042a0| 74 6f 20 74 68 65 20 73 | 63 72 65 65 6e 20 61 6e |to the s|creen an|
|000042b0| 64 20 74 68 65 20 09 09 | 09 09 09 20 20 20 20 20 |d the ..|... |
|000042c0| 70 72 69 6e 74 65 72 27 | 73 20 47 72 61 66 50 6f |printer'|s GrafPo|
|000042d0| 72 74 2e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |rt.. | |
|000042e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000042f0| 20 20 20 20 20 20 20 20 | 20 20 2a 2a 2f 0d 20 20 | | **/. |
|00004300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004320| 20 20 20 20 44 72 61 77 | 53 74 75 66 66 20 28 28 | Draw|Stuff ((|
|00004330| 2a 2a 74 68 65 50 72 52 | 65 63 48 64 6c 29 2e 70 |**thePrR|ecHdl).p|
|00004340| 72 49 6e 66 6f 2e 72 50 | 61 67 65 2c 20 0d 20 20 |rInfo.rP|age, . |
|00004350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 28 | | (|
|00004380| 47 72 61 66 50 74 72 29 | 20 74 68 65 50 72 50 6f |GrafPtr)| thePrPo|
|00004390| 72 74 2c 20 70 61 67 65 | 4e 75 6d 62 65 72 29 3b |rt, page|Number);|
|000043a0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000043b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000043c0| 20 20 20 20 20 7d 0d 20 | 20 20 20 20 20 20 20 20 | }. | |
|000043d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000043e0| 20 20 20 20 20 20 20 20 | 20 50 72 43 6c 6f 73 65 | | PrClose|
|000043f0| 50 61 67 65 28 74 68 65 | 50 72 50 6f 72 74 29 3b |Page(the|PrPort);|
|00004400| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004420| 20 20 20 70 61 67 65 4e | 75 6d 62 65 72 2b 2b 3b | pageN|umber++;|
|00004430| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004450| 20 7d 20 20 2f 2a 2a 20 | 20 45 6e 64 20 70 61 67 | } /** | End pag|
|00004460| 65 4e 75 6d 62 65 72 20 | 6c 6f 6f 70 20 20 2a 2a |eNumber |loop **|
|00004470| 2f 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |/. | |
|00004480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0d | | }.|
|00004490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000044a0| 20 20 20 20 20 20 20 20 | 20 20 50 72 43 6c 6f 73 | | PrClos|
|000044b0| 65 44 6f 63 28 74 68 65 | 50 72 50 6f 72 74 29 3b |eDoc(the|PrPort);|
|000044c0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000044d0| 20 20 20 20 20 20 20 20 | 20 7d 20 2f 2a 2a 20 20 | | } /** |
|000044e0| 45 6e 64 20 63 6f 70 69 | 65 73 20 6c 6f 6f 70 20 |End copi|es loop |
|000044f0| 20 2a 2a 2f 0d 20 20 20 | 20 20 20 20 20 20 20 20 | **/. | |
|00004500| 20 20 20 20 20 20 20 20 | 20 7d 0d 20 20 20 20 20 | | }. |
|00004510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2a | | /*|
|00004520| 2a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*. | |
|00004530| 20 20 20 20 20 20 20 20 | 20 54 68 65 20 70 72 69 | | The pri|
|00004540| 6e 74 69 6e 67 20 6a 6f | 62 20 69 73 20 62 65 69 |nting jo|b is bei|
|00004550| 6e 67 20 63 61 6e 63 65 | 6c 65 64 20 62 79 20 74 |ng cance|led by t|
|00004560| 68 65 20 72 65 71 75 65 | 73 74 20 6f 66 20 74 68 |he reque|st of th|
|00004570| 65 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | |
|00004580| 20 20 20 20 20 20 20 20 | 20 75 73 65 72 20 66 72 | | user fr|
|00004590| 6f 6d 20 74 68 65 20 50 | 72 69 6e 74 20 53 74 79 |om the P|rint Sty|
|000045a0| 6c 65 20 44 69 61 6c 6f | 67 20 6f 72 20 74 68 65 |le Dialo|g or the|
|000045b0| 20 50 72 69 6e 74 20 4a | 6f 62 20 44 69 61 6c 6f | Print J|ob Dialo|
|000045c0| 67 2e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |g.. | |
|000045d0| 20 20 20 20 20 20 20 20 | 20 20 50 72 45 72 72 6f | | PrErro|
|000045e0| 72 20 77 69 6c 6c 20 62 | 65 20 73 65 74 20 74 6f |r will b|e set to|
|000045f0| 20 50 72 41 62 6f 72 74 | 20 74 6f 20 74 65 6c 6c | PrAbort| to tell|
|00004600| 20 74 68 65 20 50 72 69 | 6e 74 20 4d 61 6e 61 67 | the Pri|nt Manag|
|00004610| 65 72 20 74 6f 0d 20 20 | 20 20 20 20 20 20 20 20 |er to. | |
|00004620| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 61 62 6f | | abo|
|00004630| 72 74 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |rt the c|urrent p|
|00004640| 72 69 6e 74 69 6e 67 20 | 6a 6f 62 2e 0d 20 20 20 |rinting |job.. |
|00004650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004660| 20 2a 2a 2f 0d 20 20 20 | 20 20 20 20 20 20 20 20 | **/. | |
|00004670| 20 20 20 20 20 20 20 65 | 6c 73 65 0d 20 20 20 20 | e|lse. |
|00004680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004690| 50 72 53 65 74 45 72 72 | 6f 72 20 28 69 50 72 41 |PrSetErr|or (iPrA|
|000046a0| 62 6f 72 74 29 3b 20 20 | 20 2f 2a 2a 20 20 63 61 |bort); | /** ca|
|000046b0| 6e 63 65 6c 20 66 72 6f | 6d 20 74 68 65 20 6a 6f |ncel fro|m the jo|
|000046c0| 62 20 64 69 61 6c 6f 67 | 20 20 2a 2a 2f 0d 20 20 |b dialog| **/. |
|000046d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0d | | }.|
|000046e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 65 6c | | el|
|000046f0| 73 65 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |se. | |
|00004700| 20 20 20 50 72 53 65 74 | 45 72 72 6f 72 20 28 69 | PrSet|Error (i|
|00004710| 50 72 41 62 6f 72 74 29 | 3b 20 20 20 2f 2a 2a 20 |PrAbort)|; /** |
|00004720| 20 63 61 6e 63 65 6c 20 | 66 72 6f 6d 20 74 68 65 | cancel |from the|
|00004730| 20 73 74 79 6c 65 20 64 | 69 61 6c 6f 67 20 20 2a | style d|ialog *|
|00004740| 2a 2f 20 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |*/ . | |
|00004750| 7d 0d 20 20 20 20 20 20 | 20 20 7d 0d 20 20 20 20 |}. | }. |
|00004760| 20 20 69 66 20 28 28 28 | 2a 2a 74 68 65 50 72 52 | if (((|**thePrR|
|00004770| 65 63 48 64 6c 29 2e 70 | 72 4a 6f 62 2e 62 4a 44 |ecHdl).p|rJob.bJD|
|00004780| 6f 63 4c 6f 6f 70 20 3d | 3d 20 62 53 70 6f 6f 6c |ocLoop =|= bSpool|
|00004790| 4c 6f 6f 70 29 20 26 26 | 20 28 50 72 45 72 72 6f |Loop) &&| (PrErro|
|000047a0| 72 28 29 20 3d 3d 20 6e | 6f 45 72 72 29 29 0d 20 |r() == n|oErr)). |
|000047b0| 20 20 20 20 20 20 20 50 | 72 50 69 63 46 69 6c 65 | P|rPicFile|
|000047c0| 28 74 68 65 50 72 52 65 | 63 48 64 6c 2c 20 6e 69 |(thePrRe|cHdl, ni|
|000047d0| 6c 2c 20 6e 69 6c 2c 20 | 6e 69 6c 2c 20 26 74 68 |l, nil, |nil, &th|
|000047e0| 65 53 74 61 74 75 73 29 | 3b 0d 20 20 20 20 20 20 |eStatus)|;. |
|000047f0| 20 2f 2a 2a 0d 20 20 20 | 20 20 20 20 20 20 20 20 | /**. | |
|00004800| 47 72 61 62 20 74 68 65 | 20 70 72 69 6e 74 69 6e |Grab the| printin|
|00004810| 67 20 65 72 72 6f 72 20 | 2d 2d 20 6f 6e 63 65 20 |g error |-- once |
|00004820| 79 6f 75 20 63 6c 6f 73 | 65 20 74 68 65 20 50 72 |you clos|e the Pr|
|00004830| 69 6e 74 69 6e 67 20 4d | 61 6e 61 67 65 72 2c 20 |inting M|anager, |
|00004840| 50 72 45 72 72 6f 72 20 | 64 6f 65 73 6e 27 74 0d |PrError |doesn't.|
|00004850| 09 20 20 20 72 65 74 75 | 72 6e 61 20 76 61 6c 69 |. retu|rna vali|
|00004860| 64 20 72 65 73 75 6c 74 | 20 61 6e 79 6d 6f 72 65 |d result| anymore|
|00004870| 2e 20 0d 20 20 20 20 20 | 20 20 2a 2a 2f 0d 20 20 |. . | **/. |
|00004880| 20 20 20 20 50 72 69 6e | 74 45 72 72 6f 72 20 3d | Prin|tError =|
|00004890| 20 50 72 45 72 72 6f 72 | 28 29 3b 0d 20 20 20 20 | PrError|();. |
|000048a0| 20 20 50 72 43 6c 6f 73 | 65 28 29 3b 0d 20 20 20 | PrClos|e();. |
|000048b0| 20 20 20 20 2f 2a 2a 0d | 20 20 20 20 20 20 20 20 | /**.| |
|000048c0| 20 20 20 59 6f 75 20 64 | 6f 20 6e 6f 74 20 77 61 | You d|o not wa|
|000048d0| 6e 74 20 74 6f 20 72 65 | 70 6f 72 74 20 61 6e 79 |nt to re|port any|
|000048e0| 20 70 72 69 6e 74 69 6e | 67 20 65 72 72 6f 72 73 | printin|g errors|
|000048f0| 20 75 6e 74 69 6c 20 79 | 6f 75 20 68 61 76 65 20 | until y|ou have |
|00004900| 66 61 6c 6c 65 6e 0d 20 | 20 20 20 20 20 20 20 20 |fallen. | |
|00004910| 20 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 70 72 | throug|h the pr|
|00004920| 69 6e 74 69 6e 67 20 6c | 6f 6f 70 2e 20 54 68 69 |inting l|oop. Thi|
|00004930| 73 20 77 69 6c 6c 20 6d | 61 6b 65 20 73 75 72 65 |s will m|ake sure|
|00004940| 20 74 68 61 74 20 41 4c | 4c 20 6f 66 20 74 68 65 | that AL|L of the|
|00004950| 20 50 72 69 6e 74 0d 20 | 20 20 20 20 20 20 20 20 | Print. | |
|00004960| 20 20 4d 61 6e 61 67 65 | 72 27 73 20 6f 70 65 6e | Manage|r's open|
|00004970| 20 63 61 6c 6c 73 20 68 | 61 76 65 20 74 68 65 69 | calls h|ave thei|
|00004980| 72 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |r corres|ponding |
|00004990| 63 6c 6f 73 65 20 63 61 | 6c 6c 73 2c 20 74 68 65 |close ca|lls, the|
|000049a0| 72 65 62 79 0d 20 20 20 | 20 20 20 20 20 20 20 20 |reby. | |
|000049b0| 65 6e 61 62 6c 69 6e 67 | 20 74 68 65 20 50 72 69 |enabling| the Pri|
|000049c0| 6e 74 20 4d 61 6e 61 67 | 65 72 20 74 6f 20 63 6c |nt Manag|er to cl|
|000049d0| 6f 73 65 20 70 72 6f 70 | 65 72 6c 79 20 61 6e 64 |ose prop|erly and|
|000049e0| 20 74 68 61 74 20 61 6c | 6c 20 74 65 6d 70 6f 72 | that al|l tempor|
|000049f0| 61 72 79 0d 20 20 20 20 | 20 20 20 20 20 20 20 6d |ary. | m|
|00004a00| 65 6d 6f 72 79 20 61 6c | 6c 6f 63 61 74 69 6f 6e |emory al|location|
|00004a10| 73 20 61 72 65 20 72 65 | 6c 65 61 73 65 64 2e 0d |s are re|leased..|
|00004a20| 20 20 20 20 20 20 20 20 | 2a 2a 2f 0d 20 20 20 20 | |**/. |
|00004a30| 20 20 69 66 20 28 50 72 | 69 6e 74 45 72 72 6f 72 | if (Pr|intError|
|00004a40| 20 21 3d 20 6e 6f 45 72 | 72 29 20 0d 20 20 20 20 | != noEr|r) . |
|00004a50| 20 20 20 20 50 6f 73 74 | 50 72 69 6e 74 69 6e 67 | Post|Printing|
|00004a60| 45 72 72 6f 72 73 20 28 | 50 72 69 6e 74 45 72 72 |Errors (|PrintErr|
|00004a70| 6f 72 29 3b 0d 20 20 20 | 20 7d 0d 20 20 69 66 20 |or);. | }. if |
|00004a80| 28 74 68 65 50 72 52 65 | 63 48 64 6c 20 21 3d 20 |(thePrRe|cHdl != |
|00004a90| 6e 69 6c 29 0d 20 20 20 | 20 44 69 73 70 6f 73 48 |nil). | DisposH|
|00004aa0| 61 6e 64 6c 65 28 28 48 | 61 6e 64 6c 65 29 20 74 |andle((H|andle) t|
|00004ab0| 68 65 50 72 52 65 63 48 | 64 6c 29 3b 0d 20 20 69 |hePrRecH|dl);. i|
|00004ac0| 66 20 28 50 72 69 6e 74 | 69 6e 67 53 74 61 74 75 |f (Print|ingStatu|
|00004ad0| 73 44 69 61 6c 6f 67 20 | 21 3d 20 6e 69 6c 29 0d |sDialog |!= nil).|
|00004ae0| 20 20 20 20 44 69 73 70 | 6f 73 44 69 61 6c 6f 67 | Disp|osDialog|
|00004af0| 28 50 72 69 6e 74 69 6e | 67 53 74 61 74 75 73 44 |(Printin|gStatusD|
|00004b00| 69 61 6c 6f 67 29 3b 0d | 20 20 53 65 74 50 6f 72 |ialog);.| SetPor|
|00004b10| 74 28 6f 6c 64 50 6f 72 | 74 29 3b 0d 7d 20 20 2f |t(oldPor|t);.} /|
|00004b20| 2a 2a 20 50 72 69 6e 74 | 53 74 75 66 66 20 2a 2a |** Print|Stuff **|
|00004b30| 2f 0d 43 68 65 63 6b 69 | 6e 67 20 41 6e 64 20 48 |/.Checki|ng And H|
|00004b40| 61 6e 64 6c 69 6e 67 20 | 50 72 69 6e 74 69 6e 67 |andling |Printing|
|00004b50| 20 45 72 72 6f 72 73 0d | 41 6e 20 61 70 70 6c 69 | Errors.|An appli|
|00004b60| 63 61 74 69 6f 6e 20 73 | 68 6f 75 6c 64 20 61 6c |cation s|hould al|
|00004b70| 77 61 79 73 20 63 68 65 | 63 6b 20 66 6f 72 20 65 |ways che|ck for e|
|00004b80| 72 72 6f 72 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |rror con|ditions |
|00004b90| 77 68 69 6c 65 20 70 72 | 69 6e 74 69 6e 67 20 62 |while pr|inting b|
|00004ba0| 79 20 63 61 6c 6c 69 6e | 67 20 50 72 45 72 72 6f |y callin|g PrErro|
|00004bb0| 72 2e 20 20 50 72 45 72 | 72 6f 72 20 72 65 74 75 |r. PrEr|ror retu|
|00004bc0| 72 6e 73 20 65 72 72 6f | 72 73 20 66 72 6f 6d 20 |rns erro|rs from |
|00004bd0| 74 68 65 20 50 72 69 6e | 74 69 6e 67 20 4d 61 6e |the Prin|ting Man|
|00004be0| 61 67 65 72 20 28 61 6e | 64 20 73 6f 6d 65 20 41 |ager (an|d some A|
|00004bf0| 70 70 6c 65 54 61 6c 6b | 20 61 6e 64 20 4f 53 20 |ppleTalk| and OS |
|00004c00| 65 72 72 6f 72 73 29 20 | 74 68 61 74 20 6f 63 63 |errors) |that occ|
|00004c10| 75 72 20 64 75 72 69 6e | 67 20 70 72 69 6e 74 69 |ur durin|g printi|
|00004c20| 6e 67 2e 0d 41 73 20 74 | 68 65 20 65 78 61 6d 70 |ng..As t|he examp|
|00004c30| 6c 65 20 63 6f 64 65 20 | 64 65 6d 6f 6e 73 74 72 |le code |demonstr|
|00004c40| 61 74 65 73 2c 20 61 6e | 20 61 70 70 6c 69 63 61 |ates, an| applica|
|00004c50| 74 69 6f 6e 20 73 68 6f | 75 6c 64 20 63 61 6c 6c |tion sho|uld call|
|00004c60| 20 50 72 45 72 72 6f 72 | 20 61 66 74 65 72 20 65 | PrError| after e|
|00004c70| 61 63 68 20 63 61 6c 6c | 20 74 6f 20 61 20 50 72 |ach call| to a Pr|
|00004c80| 69 6e 74 69 6e 67 20 4d | 61 6e 61 67 65 72 20 66 |inting M|anager f|
|00004c90| 75 6e 63 74 69 6f 6e 20 | 6f 72 20 70 72 6f 63 65 |unction |or proce|
|00004ca0| 64 75 72 65 2e 20 20 42 | 79 20 63 6f 6e 73 69 73 |dure. B|y consis|
|00004cb0| 74 65 6e 74 6c 79 20 63 | 68 65 63 6b 69 6e 67 20 |tently c|hecking |
|00004cc0| 50 72 45 72 72 6f 72 20 | 61 66 74 65 72 20 65 61 |PrError |after ea|
|00004cd0| 63 68 20 63 61 6c 6c 2c | 20 74 68 65 20 61 70 70 |ch call,| the app|
|00004ce0| 6c 69 63 61 74 69 6f 6e | 20 69 73 20 61 62 6c 65 |lication| is able|
|00004cf0| 20 74 6f 20 63 61 74 63 | 68 20 61 6e 79 20 65 72 | to catc|h any er|
|00004d00| 72 6f 72 73 20 63 72 65 | 61 74 65 64 20 61 74 20 |rors cre|ated at |
|00004d10| 70 72 69 6e 74 20 74 69 | 6d 65 20 61 6e 64 20 72 |print ti|me and r|
|00004d20| 65 70 6f 72 74 20 74 68 | 65 6d 20 74 6f 20 61 20 |eport th|em to a |
|00004d30| 75 73 65 72 20 76 69 61 | 20 61 20 64 69 61 6c 6f |user via| a dialo|
|00004d40| 67 20 62 6f 78 20 69 6e | 20 61 20 63 6c 65 61 6e |g box in| a clean|
|00004d50| 20 61 6e 64 20 67 72 61 | 63 65 66 75 6c 20 6d 61 | and gra|ceful ma|
|00004d60| 6e 6e 65 72 2e 0d 54 68 | 65 20 66 6f 6c 6c 6f 77 |nner..Th|e follow|
|00004d70| 69 6e 67 20 73 65 63 74 | 69 6f 6e 20 6f 75 74 6c |ing sect|ion outl|
|00004d80| 69 6e 65 73 20 73 6f 6d | 65 20 67 65 6e 65 72 61 |ines som|e genera|
|00004d90| 6c 20 65 72 72 6f 72 2d | 68 61 6e 64 6c 69 6e 67 |l error-|handling|
|00004da0| 20 67 75 69 64 65 6c 69 | 6e 65 73 2e 0d a5 09 59 | guideli|nes....Y|
|00004db0| 6f 75 20 73 68 6f 75 6c | 64 20 61 76 6f 69 64 20 |ou shoul|d avoid |
|00004dc0| 63 61 6c 6c 69 6e 67 20 | 50 72 45 72 72 6f 72 20 |calling |PrError |
|00004dd0| 77 69 74 68 69 6e 20 79 | 6f 75 72 20 70 49 64 6c |within y|our pIdl|
|00004de0| 65 20 70 72 6f 63 65 64 | 75 72 65 3b 20 65 72 72 |e proced|ure; err|
|00004df0| 6f 72 73 20 74 68 61 74 | 20 6f 63 63 75 72 20 77 |ors that| occur w|
|00004e00| 68 69 6c 65 20 69 74 20 | 69 73 20 65 78 65 63 75 |hile it |is execu|
|00004e10| 74 69 6e 67 20 61 72 65 | 20 75 73 75 61 6c 6c 79 |ting are| usually|
|00004e20| 20 74 65 6d 70 6f 72 61 | 72 79 20 61 6e 64 20 73 | tempora|ry and s|
|00004e30| 65 72 76 65 20 6f 6e 6c | 79 20 61 73 20 69 6e 74 |erve onl|y as int|
|00004e40| 65 72 6e 61 6c 20 66 6c | 61 67 73 20 66 6f 72 20 |ernal fl|ags for |
|00004e50| 63 6f 6d 6d 75 6e 69 63 | 61 74 69 6f 6e 20 77 69 |communic|ation wi|
|00004e60| 74 68 69 6e 20 74 68 65 | 20 70 72 69 6e 74 65 72 |thin the| printer|
|00004e70| 20 64 72 69 76 65 72 d1 | 74 68 65 79 20 61 72 65 | driver.|they are|
|00004e80| 20 6e 6f 74 20 69 6e 74 | 65 6e 64 65 64 20 66 6f | not int|ended fo|
|00004e90| 72 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |r the ap|plicatio|
|00004ea0| 6e 2e 20 20 49 66 20 79 | 6f 75 20 61 62 73 6f 6c |n. If y|ou absol|
|00004eb0| 75 74 65 6c 79 20 6d 75 | 73 74 20 63 61 6c 6c 20 |utely mu|st call |
|00004ec0| 50 72 45 72 72 6f 72 20 | 77 69 74 68 69 6e 20 79 |PrError |within y|
|00004ed0| 6f 75 72 20 69 64 6c 65 | 20 70 72 6f 63 65 64 75 |our idle| procedu|
|00004ee0| 72 65 2c 20 61 6e 64 20 | 61 6e 20 65 72 72 6f 72 |re, and |an error|
|00004ef0| 20 6f 63 63 75 72 73 2c | 20 6e 65 76 65 72 20 61 | occurs,| never a|
|00004f00| 62 6f 72 74 20 70 72 69 | 6e 74 69 6e 67 20 77 69 |bort pri|nting wi|
|00004f10| 74 68 69 6e 20 74 68 65 | 20 69 64 6c 65 20 70 72 |thin the| idle pr|
|00004f20| 6f 63 65 64 75 72 65 20 | 69 74 73 65 6c 66 2e 20 |ocedure |itself. |
|00004f30| 20 57 61 69 74 20 75 6e | 74 69 6c 20 74 68 65 20 | Wait un|til the |
|00004f40| 6c 61 73 74 20 63 61 6c | 6c 65 64 20 70 72 69 6e |last cal|led prin|
|00004f50| 74 69 6e 67 20 70 72 6f | 63 65 64 75 72 65 20 72 |ting pro|cedure r|
|00004f60| 65 74 75 72 6e 73 2c 20 | 74 68 65 6e 20 63 68 65 |eturns, |then che|
|00004f70| 63 6b 20 74 6f 20 73 65 | 65 20 69 66 20 74 68 65 |ck to se|e if the|
|00004f80| 20 65 72 72 6f 72 20 73 | 74 69 6c 6c 20 72 65 6d | error s|till rem|
|00004f90| 61 69 6e 73 2e 20 20 41 | 74 74 65 6d 70 74 69 6e |ains. A|ttemptin|
|00004fa0| 67 20 74 6f 20 61 62 6f | 72 74 20 70 72 69 6e 74 |g to abo|rt print|
|00004fb0| 69 6e 67 20 77 69 74 68 | 69 6e 20 61 6e 20 69 64 |ing with|in an id|
|00004fc0| 6c 65 20 70 72 6f 63 65 | 64 75 72 65 20 69 73 20 |le proce|dure is |
|00004fd0| 61 20 67 75 61 72 61 6e | 74 65 65 20 6f 66 20 63 |a guaran|tee of c|
|00004fe0| 65 72 74 61 69 6e 20 64 | 65 61 74 68 2e 0d a5 09 |ertain d|eath....|
|00004ff0| 55 70 6f 6e 20 64 65 74 | 65 63 74 69 6e 67 20 61 |Upon det|ecting a|
|00005000| 6e 20 65 72 72 6f 72 20 | 61 66 74 65 72 20 74 68 |n error |after th|
|00005010| 65 20 63 6f 6d 70 6c 65 | 74 69 6f 6e 20 6f 66 20 |e comple|tion of |
|00005020| 61 20 70 72 69 6e 74 69 | 6e 67 20 72 6f 75 74 69 |a printi|ng routi|
|00005030| 6e 65 2c 20 73 74 6f 70 | 20 64 72 61 77 69 6e 67 |ne, stop| drawing|
|00005040| 20 61 74 20 74 68 61 74 | 20 70 6f 69 6e 74 2c 20 | at that| point, |
|00005050| 61 6e 64 20 70 72 6f 63 | 65 65 64 20 74 6f 20 74 |and proc|eed to t|
|00005060| 68 65 20 6e 65 78 74 20 | 70 72 6f 63 65 64 75 72 |he next |procedur|
|00005070| 65 20 74 6f 20 63 6c 6f | 73 65 20 61 6e 79 20 70 |e to clo|se any p|
|00005080| 72 65 76 69 6f 75 73 6c | 79 20 6d 61 64 65 20 6f |reviousl|y made o|
|00005090| 70 65 6e 20 63 61 6c 6c | 73 2e 20 20 46 6f 72 20 |pen call|s. For |
|000050a0| 65 78 61 6d 70 6c 65 2c | 20 69 66 20 79 6f 75 20 |example,| if you |
|000050b0| 64 65 74 65 63 74 20 61 | 6e 20 65 72 72 6f 72 20 |detect a|n error |
|000050c0| 61 66 74 65 72 20 63 61 | 6c 6c 69 6e 67 20 50 72 |after ca|lling Pr|
|000050d0| 4f 70 65 6e 44 6f 63 2c | 20 73 6b 69 70 20 74 6f |OpenDoc,| skip to|
|000050e0| 20 74 68 65 20 6e 65 78 | 74 20 50 72 43 6c 6f 73 | the nex|t PrClos|
|000050f0| 65 44 6f 63 2e 20 20 4f | 72 2c 20 69 66 20 79 6f |eDoc. O|r, if yo|
|00005100| 75 20 67 65 74 20 61 6e | 20 65 72 72 6f 72 20 61 |u get an| error a|
|00005110| 66 74 65 72 20 63 61 6c | 6c 69 6e 67 20 50 72 4f |fter cal|ling PrO|
|00005120| 70 65 6e 50 61 67 65 2c | 20 73 6b 69 70 20 74 6f |penPage,| skip to|
|00005130| 20 74 68 65 20 6e 65 78 | 74 20 50 72 43 6c 6f 73 | the nex|t PrClos|
|00005140| 65 50 61 67 65 20 61 6e | 64 20 50 72 43 6c 6f 73 |ePage an|d PrClos|
|00005150| 65 44 6f 63 2e 20 20 52 | 65 6d 65 6d 62 65 72 20 |eDoc. R|emember |
|00005160| 74 68 61 74 20 69 66 20 | 79 6f 75 20 68 61 76 65 |that if |you have|
|00005170| 20 63 61 6c 6c 65 64 20 | 50 72 4f 70 65 6e 2c 20 | called |PrOpen, |
|00005180| 74 68 65 6e 20 79 6f 75 | 20 6d 75 73 74 20 63 61 |then you| must ca|
|00005190| 6c 6c 20 74 68 65 20 63 | 6f 72 72 65 73 70 6f 6e |ll the c|orrespon|
|000051a0| 64 69 6e 67 20 50 72 43 | 6c 6f 73 65 20 74 6f 20 |ding PrC|lose to |
|000051b0| 65 6e 73 75 72 65 20 74 | 68 61 74 20 70 72 69 6e |ensure t|hat prin|
|000051c0| 74 69 6e 67 20 63 6c 6f | 73 65 73 20 70 72 6f 70 |ting clo|ses prop|
|000051d0| 65 72 6c 79 20 61 6e 64 | 20 61 6c 6c 20 74 65 6d |erly and| all tem|
|000051e0| 70 6f 72 61 72 79 20 6d | 65 6d 6f 72 79 20 61 6c |porary m|emory al|
|000051f0| 6c 6f 63 61 74 69 6f 6e | 73 20 61 72 65 20 72 65 |location|s are re|
|00005200| 6c 65 61 73 65 64 20 61 | 6e 64 20 72 65 74 75 72 |leased a|nd retur|
|00005210| 6e 65 64 20 74 6f 20 74 | 68 65 20 68 65 61 70 2e |ned to t|he heap.|
|00005220| 0d a5 09 44 6f 20 6e 6f | 74 20 64 69 73 70 6c 61 |...Do no|t displa|
|00005230| 79 20 61 6e 79 20 61 6c | 65 72 74 20 6f 72 20 64 |y any al|ert or d|
|00005240| 69 61 6c 6f 67 20 62 6f | 78 65 73 20 74 6f 20 72 |ialog bo|xes to r|
|00005250| 65 70 6f 72 74 20 61 6e | 20 65 72 72 6f 72 20 75 |eport an| error u|
|00005260| 6e 74 69 6c 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |ntil the| end of |
|00005270| 74 68 65 20 70 72 69 6e | 74 69 6e 67 20 6c 6f 6f |the prin|ting loo|
|00005280| 70 2e 20 20 4f 6e 63 65 | 20 61 74 20 74 68 65 20 |p. Once| at the |
|00005290| 65 6e 64 2c 20 63 68 65 | 63 6b 20 66 6f 72 20 74 |end, che|ck for t|
|000052a0| 68 65 20 65 72 72 6f 72 | 20 61 67 61 69 6e 3b 20 |he error| again; |
|000052b0| 69 66 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 65 |if there| is no e|
|000052c0| 72 72 6f 72 20 61 73 73 | 75 6d 65 20 74 68 61 74 |rror ass|ume that|
|000052d0| 20 70 72 69 6e 74 69 6e | 67 20 63 6f 6d 70 6c 65 | printin|g comple|
|000052e0| 74 65 64 20 6e 6f 72 6d | 61 6c 6c 79 2e 20 20 49 |ted norm|ally. I|
|000052f0| 66 20 74 68 65 20 65 72 | 72 6f 72 20 69 73 20 73 |f the er|ror is s|
|00005300| 74 69 6c 6c 20 70 72 65 | 73 65 6e 74 2c 20 74 68 |till pre|sent, th|
|00005310| 65 6e 20 79 6f 75 20 63 | 61 6e 20 61 6c 65 72 74 |en you c|an alert|
|00005320| 20 74 68 65 20 75 73 65 | 72 2e 0d 09 54 68 69 73 | the use|r...This|
|00005330| 20 74 65 63 68 6e 69 71 | 75 65 20 69 73 20 69 6d | techniq|ue is im|
|00005340| 70 6f 72 74 61 6e 74 20 | 66 6f 72 20 74 77 6f 20 |portant |for two |
|00005350| 72 65 61 73 6f 6e 73 2e | 20 20 46 69 72 73 74 2c |reasons.| First,|
|00005360| 20 69 66 20 79 6f 75 20 | 64 69 73 70 6c 61 79 20 | if you |display |
|00005370| 61 20 64 69 61 6c 6f 67 | 20 62 6f 78 20 69 6e 20 |a dialog| box in |
|00005380| 74 68 65 20 6d 69 64 64 | 6c 65 20 6f 66 20 74 68 |the midd|le of th|
|00005390| 65 20 70 72 69 6e 74 69 | 6e 67 20 6c 6f 6f 70 2c |e printi|ng loop,|
|000053a0| 20 69 74 20 63 6f 75 6c | 64 20 63 61 75 73 65 20 | it coul|d cause |
|000053b0| 65 72 72 6f 72 73 20 74 | 68 61 74 20 63 61 6e 20 |errors t|hat can |
|000053c0| 74 65 72 6d 69 6e 61 74 | 65 20 61 6e 20 6f 74 68 |terminat|e an oth|
|000053d0| 65 72 77 69 73 65 20 6e | 6f 72 6d 61 6c 20 6a 6f |erwise n|ormal jo|
|000053e0| 62 2e 20 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |b. For |example,|
|000053f0| 20 69 66 20 74 68 65 20 | 70 72 69 6e 74 65 72 20 | if the |printer |
|00005400| 69 73 20 61 6e 20 41 70 | 70 6c 65 54 61 6c 6b 20 |is an Ap|pleTalk |
|00005410| 70 72 69 6e 74 65 72 2c | 20 74 68 65 20 63 6f 6e |printer,| the con|
|00005420| 6e 65 63 74 69 6f 6e 20 | 63 61 6e 20 62 65 20 74 |nection |can be t|
|00005430| 65 72 6d 69 6e 61 74 65 | 64 20 61 62 6e 6f 72 6d |erminate|d abnorm|
|00005440| 61 6c 6c 79 20 73 69 6e | 63 65 20 74 68 65 20 64 |ally sin|ce the d|
|00005450| 72 69 76 65 72 20 77 6f | 75 6c 64 20 62 65 20 75 |river wo|uld be u|
|00005460| 6e 61 62 6c 65 20 74 6f | 20 72 65 73 70 6f 6e 64 |nable to| respond|
|00005470| 20 74 6f 20 41 70 70 6c | 65 54 61 6c 6b 20 72 65 | to Appl|eTalk re|
|00005480| 71 75 65 73 74 73 20 72 | 65 63 65 69 76 65 64 20 |quests r|eceived |
|00005490| 66 72 6f 6d 20 74 68 65 | 20 70 72 69 6e 74 65 72 |from the| printer|
|000054a0| 20 77 68 69 6c 65 20 74 | 68 65 20 64 69 61 6c 6f | while t|he dialo|
|000054b0| 67 20 62 6f 78 20 77 61 | 73 20 77 61 69 74 69 6e |g box wa|s waitin|
|000054c0| 67 20 66 6f 72 20 69 6e | 70 75 74 20 66 72 6f 6d |g for in|put from|
|000054d0| 20 74 68 65 20 75 73 65 | 72 2e 20 20 49 66 20 74 | the use|r. If t|
|000054e0| 68 65 20 70 72 69 6e 74 | 65 72 20 64 6f 65 73 20 |he print|er does |
|000054f0| 6e 6f 74 20 68 65 61 72 | 20 66 72 6f 6d 20 74 68 |not hear| from th|
|00005500| 65 20 4d 61 63 69 6e 74 | 6f 73 68 20 77 69 74 68 |e Macint|osh with|
|00005510| 20 61 20 73 68 6f 72 74 | 20 70 65 72 69 6f 64 20 | a short| period |
|00005520| 6f 66 20 74 69 6d 65 20 | 28 65 2e 67 2e 2c 20 33 |of time |(e.g., 3|
|00005530| 30 20 73 65 63 6f 6e 64 | 73 29 2c 20 69 74 20 74 |0 second|s), it t|
|00005540| 69 6d 65 73 20 6f 75 74 | 2c 20 61 73 73 75 6d 69 |imes out|, assumi|
|00005550| 6e 67 20 74 68 61 74 20 | 74 68 65 20 4d 61 63 69 |ng that |the Maci|
|00005560| 6e 74 6f 73 68 20 69 73 | 20 6e 6f 20 6c 6f 6e 67 |ntosh is| no long|
|00005570| 65 72 20 74 68 65 72 65 | 2c 20 77 68 69 63 68 20 |er there|, which |
|00005580| 72 65 73 75 6c 74 73 20 | 69 6e 20 61 20 70 72 65 |results |in a pre|
|00005590| 6d 61 74 75 72 65 6c 79 | 20 62 72 6f 6b 65 6e 20 |maturely| broken |
|000055a0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 63 61 75 73 69 |connecti|on causi|
|000055b0| 6e 67 20 61 6e 6f 74 68 | 65 72 20 65 72 72 6f 72 |ng anoth|er error|
|000055c0| 20 74 6f 20 77 68 69 63 | 68 20 74 68 65 20 61 70 | to whic|h the ap|
|000055d0| 70 6c 69 63 61 74 69 6f | 6e 20 6d 75 73 74 20 72 |plicatio|n must r|
|000055e0| 65 73 70 6f 6e 64 2e 0d | 09 49 6e 20 61 64 64 69 |espond..|.In addi|
|000055f0| 74 69 6f 6e 2c 20 74 68 | 65 20 64 72 69 76 65 72 |tion, th|e driver|
|00005600| 20 6d 61 79 20 68 61 76 | 65 20 61 6c 72 65 61 64 | may hav|e alread|
|00005610| 79 20 64 69 73 70 6c 61 | 79 65 64 20 69 74 73 20 |y displa|yed its |
|00005620| 6f 77 6e 20 64 69 61 6c | 6f 67 20 62 6f 78 20 69 |own dial|og box i|
|00005630| 6e 20 72 65 73 70 6f 6e | 73 65 20 74 6f 20 61 6e |n respon|se to an|
|00005640| 20 65 72 72 6f 72 2e 20 | 20 49 6e 20 74 68 69 73 | error. | In this|
|00005650| 20 69 6e 73 74 61 6e 63 | 65 2c 20 74 68 65 20 64 | instanc|e, the d|
|00005660| 72 69 76 65 72 20 70 6f | 73 74 73 20 61 6e 20 65 |river po|sts an e|
|00005670| 72 72 6f 72 20 74 6f 20 | 6c 65 74 20 74 68 65 20 |rror to |let the |
|00005680| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 6b 6e 6f 77 |applicat|ion know|
|00005690| 20 74 68 61 74 20 73 6f | 6d 65 74 68 69 6e 67 20 | that so|mething |
|000056a0| 77 65 6e 74 20 77 72 6f | 6e 67 20 61 6e 64 20 69 |went wro|ng and i|
|000056b0| 74 20 73 68 6f 75 6c 64 | 20 61 62 6f 72 74 20 70 |t should| abort p|
|000056c0| 72 69 6e 74 69 6e 67 2e | 20 20 46 6f 72 20 65 78 |rinting.| For ex|
|000056d0| 61 6d 70 6c 65 2c 20 77 | 68 65 6e 20 74 68 65 20 |ample, w|hen the |
|000056e0| 4c 61 73 65 72 57 72 69 | 74 65 72 20 64 72 69 76 |LaserWri|ter driv|
|000056f0| 65 72 20 64 65 74 65 63 | 74 73 20 74 68 61 74 20 |er detec|ts that |
|00005700| 74 68 65 20 4c 61 73 65 | 72 20 50 72 65 70 20 76 |the Lase|r Prep v|
|00005710| 65 72 73 69 6f 6e 20 77 | 68 69 63 68 20 68 61 73 |ersion w|hich has|
|00005720| 20 62 65 65 6e 20 64 6f | 77 6e 6c 6f 61 64 65 64 | been do|wnloaded|
|00005730| 20 74 6f 20 74 68 65 20 | 4c 61 73 65 72 57 72 69 | to the |LaserWri|
|00005740| 74 65 72 20 69 73 20 64 | 69 66 66 65 72 65 6e 74 |ter is d|ifferent|
|00005750| 20 74 68 61 6e 20 74 68 | 61 74 20 77 69 74 68 20 | than th|at with |
|00005760| 77 68 69 63 68 20 74 68 | 65 20 75 73 65 72 20 69 |which th|e user i|
|00005770| 73 20 74 72 79 69 6e 67 | 20 74 6f 20 70 72 69 6e |s trying| to prin|
|00005780| 74 2c 20 69 74 20 64 69 | 73 70 6c 61 79 73 20 74 |t, it di|splays t|
|00005790| 68 65 20 61 70 70 72 6f | 70 72 69 61 74 65 20 64 |he appro|priate d|
|000057a0| 69 61 6c 6f 67 20 62 6f | 78 20 69 6e 66 6f 72 6d |ialog bo|x inform|
|000057b0| 69 6e 67 20 74 68 65 20 | 75 73 65 72 20 6f 66 20 |ing the |user of |
|000057c0| 74 68 65 20 73 69 74 75 | 61 74 69 6f 6e 20 61 6e |the situ|ation an|
|000057d0| 64 20 67 69 76 69 6e 67 | 20 68 69 6d 20 74 68 65 |d giving| him the|
|000057e0| 20 6f 70 74 69 6f 6e 20 | 6f 66 20 72 65 69 6e 69 | option |of reini|
|000057f0| 74 69 61 6c 69 7a 69 6e | 67 20 74 68 65 20 70 72 |tializin|g the pr|
|00005800| 69 6e 74 65 72 2e 20 20 | 49 66 20 74 68 65 20 75 |inter. |If the u|
|00005810| 73 65 72 20 63 68 6f 6f | 73 65 73 20 74 6f 20 63 |ser choo|ses to c|
|00005820| 61 6e 63 65 6c 20 70 72 | 69 6e 74 69 6e 67 2c 20 |ancel pr|inting, |
|00005830| 74 68 65 20 64 72 69 76 | 65 72 20 70 6f 73 74 73 |the driv|er posts|
|00005840| 20 61 6e 20 65 72 72 6f | 72 20 74 6f 20 6c 65 74 | an erro|r to let|
|00005850| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00005860| 20 6b 6e 6f 77 20 74 68 | 61 74 20 69 74 20 6e 65 | know th|at it ne|
|00005870| 65 64 73 20 74 6f 20 61 | 62 6f 72 74 2c 20 62 75 |eds to a|bort, bu|
|00005880| 74 20 73 69 6e 63 65 20 | 74 68 65 20 64 72 69 76 |t since |the driv|
|00005890| 65 72 20 68 61 73 20 61 | 6c 72 65 61 64 79 20 74 |er has a|lready t|
|000058a0| 61 6b 65 6e 20 63 61 72 | 65 20 6f 66 20 74 68 65 |aken car|e of the|
|000058b0| 20 65 72 72 6f 72 20 62 | 79 20 64 69 73 70 6c 61 | error b|y displa|
|000058c0| 79 69 6e 67 20 61 20 64 | 69 61 6c 6f 67 20 62 6f |ying a d|ialog bo|
|000058d0| 78 2c 20 74 68 65 20 65 | 72 72 6f 72 20 69 73 20 |x, the e|rror is |
|000058e0| 72 65 73 65 74 20 74 6f | 20 7a 65 72 6f 20 62 65 |reset to| zero be|
|000058f0| 66 6f 72 65 20 74 68 65 | 20 70 72 69 6e 74 69 6e |fore the| printin|
|00005900| 67 20 6c 6f 6f 70 20 69 | 73 20 63 6f 6d 70 6c 65 |g loop i|s comple|
|00005910| 74 65 2e 20 20 54 68 65 | 20 61 70 70 6c 69 63 61 |te. The| applica|
|00005920| 74 69 6f 6e 20 73 68 6f | 75 6c 64 20 63 68 65 63 |tion sho|uld chec|
|00005930| 6b 20 66 6f 72 20 74 68 | 65 20 65 72 72 6f 72 20 |k for th|e error |
|00005940| 61 67 61 69 6e 20 61 74 | 20 74 68 65 20 65 6e 64 |again at| the end|
|00005950| 20 6f 66 20 74 68 65 20 | 70 72 69 6e 74 69 6e 67 | of the |printing|
|00005960| 20 6c 6f 6f 70 2c 20 61 | 6e 64 20 69 66 20 69 74 | loop, a|nd if it|
|00005970| 20 73 74 69 6c 6c 20 69 | 6e 64 69 63 61 74 65 73 | still i|ndicates|
|00005980| 20 61 6e 20 65 72 72 6f | 72 2c 20 74 68 65 20 61 | an erro|r, the a|
|00005990| 70 70 6c 69 63 61 74 69 | 6f 6e 20 63 61 6e 20 74 |pplicati|on can t|
|000059a0| 68 65 6e 20 64 69 73 70 | 6c 61 79 20 74 68 65 20 |hen disp|lay the |
|000059b0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 64 69 61 6c |appropri|ate dial|
|000059c0| 6f 67 20 62 6f 78 2e 0d | a5 09 49 66 20 75 73 69 |og box..|..If usi|
|000059d0| 6e 67 20 50 72 47 65 6e | 65 72 61 6c 2c 20 62 65 |ng PrGen|eral, be|
|000059e0| 20 70 72 65 70 61 72 65 | 64 20 74 6f 20 72 65 63 | prepare|d to rec|
|000059f0| 65 69 76 65 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |eive the| followi|
|00005a00| 6e 67 20 65 72 72 6f 72 | 73 3a 20 20 4e 6f 53 75 |ng error|s: NoSu|
|00005a10| 63 68 52 73 6c 2c 20 4f | 70 4e 6f 74 49 6d 70 6c |chRsl, O|pNotImpl|
|00005a20| 2c 20 61 6e 64 20 72 65 | 73 4e 6f 74 46 6f 75 6e |, and re|sNotFoun|
|00005a30| 64 2e 20 20 49 6e 20 61 | 6c 6c 20 74 68 72 65 65 |d. In a|ll three|
|00005a40| 20 63 61 73 65 73 2c 20 | 74 68 65 20 61 70 70 6c | cases, |the appl|
|00005a50| 69 63 61 74 69 6f 6e 20 | 73 68 6f 75 6c 64 20 62 |ication |should b|
|00005a60| 65 20 70 72 65 70 61 72 | 65 64 20 74 6f 20 63 6f |e prepar|ed to co|
|00005a70| 6e 74 69 6e 75 65 20 74 | 6f 20 70 72 69 6e 74 20 |ntinue t|o print |
|00005a80| 77 69 74 68 6f 75 74 20 | 75 73 69 6e 67 20 74 68 |without |using th|
|00005a90| 65 20 66 65 61 74 75 72 | 65 73 20 6f 66 20 74 68 |e featur|es of th|
|00005aa0| 61 74 20 70 61 72 74 69 | 63 75 6c 61 72 20 6f 70 |at parti|cular op|
|00005ab0| 63 6f 64 65 2e 0d 09 48 | 6f 77 65 76 65 72 2c 20 |code...H|owever, |
|00005ac0| 69 6e 20 74 68 65 20 63 | 61 73 65 20 6f 66 20 74 |in the c|ase of t|
|00005ad0| 68 65 20 72 65 73 4e 6f | 74 46 6f 75 6e 64 20 65 |he resNo|tFound e|
|00005ae0| 72 72 6f 72 2c 20 69 74 | 20 6d 65 61 6e 73 20 74 |rror, it| means t|
|00005af0| 68 65 20 63 75 72 72 65 | 6e 74 20 70 72 69 6e 74 |he curre|nt print|
|00005b00| 65 72 20 64 72 69 76 65 | 72 20 64 6f 65 73 20 6e |er drive|r does n|
|00005b10| 6f 74 20 73 75 70 70 6f | 72 74 20 50 72 47 65 6e |ot suppo|rt PrGen|
|00005b20| 65 72 61 6c 2e 20 20 54 | 68 69 73 20 6c 61 63 6b |eral. T|his lack|
|00005b30| 20 6f 66 20 73 75 70 70 | 6f 72 74 20 73 68 6f 75 | of supp|ort shou|
|00005b40| 6c 64 20 6e 6f 74 20 62 | 65 20 61 20 70 72 6f 62 |ld not b|e a prob|
|00005b50| 6c 65 6d 20 66 6f 72 20 | 61 6e 20 61 70 70 6c 69 |lem for |an appli|
|00005b60| 63 61 74 69 6f 6e 2c 20 | 62 75 74 20 69 74 20 6e |cation, |but it n|
|00005b70| 65 65 64 73 20 74 6f 20 | 62 65 20 70 72 65 70 61 |eeds to |be prepa|
|00005b80| 72 65 64 20 74 6f 20 64 | 65 61 6c 20 77 69 74 68 |red to d|eal with|
|00005b90| 20 74 68 69 73 20 65 72 | 72 6f 72 2e 20 20 49 66 | this er|ror. If|
|00005ba0| 20 79 6f 75 20 72 65 63 | 65 69 76 65 20 61 20 72 | you rec|eive a r|
|00005bb0| 65 73 4e 6f 74 46 6f 75 | 6e 64 20 65 72 72 6f 72 |esNotFou|nd error|
|00005bc0| 20 66 72 6f 6d 20 50 72 | 45 72 72 6f 72 2c 20 63 | from Pr|Error, c|
|00005bd0| 6c 65 61 72 20 74 68 65 | 20 65 72 72 6f 72 20 77 |lear the| error w|
|00005be0| 69 74 68 20 61 20 63 61 | 6c 6c 20 74 6f 20 50 72 |ith a ca|ll to Pr|
|00005bf0| 53 65 74 45 72 72 6f 72 | 28 30 29 3b 20 6f 74 68 |SetError|(0); oth|
|00005c00| 65 72 77 69 73 65 2c 20 | 50 72 45 72 72 6f 72 20 |erwise, |PrError |
|00005c10| 6d 69 67 68 74 20 73 74 | 69 6c 6c 20 63 6f 6e 74 |might st|ill cont|
|00005c20| 61 69 6e 20 74 68 69 73 | 20 65 72 72 6f 72 20 74 |ain this| error t|
|00005c30| 68 65 20 6e 65 78 74 20 | 74 69 6d 65 20 79 6f 75 |he next |time you|
|00005c40| 20 63 68 65 63 6b 20 69 | 74 2c 20 77 68 69 63 68 | check i|t, which|
|00005c50| 20 77 6f 75 6c 64 20 70 | 72 65 76 65 6e 74 20 79 | would p|revent y|
|00005c60| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|00005c70| 66 72 6f 6d 20 70 72 69 | 6e 74 69 6e 67 2e 0d 43 |from pri|nting..C|
|00005c80| 61 6e 63 65 6c 69 6e 67 | 20 6f 72 20 50 61 75 73 |anceling| or Paus|
|00005c90| 69 6e 67 20 74 68 65 20 | 50 72 69 6e 74 69 6e 67 |ing the |Printing|
|00005ca0| 20 50 72 6f 63 65 73 73 | 0d 49 66 20 79 6f 75 20 | Process|.If you |
|00005cb0| 69 6e 73 74 61 6c 6c 20 | 61 20 70 72 6f 63 65 64 |install |a proced|
|00005cc0| 75 72 65 20 66 6f 72 20 | 68 61 6e 64 6c 69 6e 67 |ure for |handling|
|00005cd0| 20 72 65 71 75 65 73 74 | 73 20 74 6f 20 63 61 6e | request|s to can|
|00005ce0| 63 65 6c 20 70 72 69 6e | 74 69 6e 67 2c 20 77 69 |cel prin|ting, wi|
|00005cf0| 74 68 20 61 6e 20 6f 70 | 74 69 6f 6e 20 74 6f 20 |th an op|tion to |
|00005d00| 70 61 75 73 65 20 74 68 | 65 20 70 72 69 6e 74 69 |pause th|e printi|
|00005d10| 6e 67 20 70 72 6f 63 65 | 73 73 2c 20 62 65 77 61 |ng proce|ss, bewa|
|00005d20| 72 65 20 6f 66 20 74 69 | 6d 65 6f 75 74 20 70 72 |re of ti|meout pr|
|00005d30| 6f 62 6c 65 6d 73 20 77 | 68 65 6e 20 70 72 69 6e |oblems w|hen prin|
|00005d40| 74 69 6e 67 20 74 6f 20 | 74 68 65 20 4c 61 73 65 |ting to |the Lase|
|00005d50| 72 57 72 69 74 65 72 2e | 20 20 43 6f 6d 6d 75 6e |rWriter.| Commun|
|00005d60| 69 63 61 74 69 6f 6e 20 | 62 65 74 77 65 65 6e 20 |ication |between |
|00005d70| 74 68 65 20 4d 61 63 69 | 6e 74 6f 73 68 20 61 6e |the Maci|ntosh an|
|00005d80| 64 20 74 68 65 20 4c 61 | 73 65 72 57 72 69 74 65 |d the La|serWrite|
|00005d90| 72 20 6d 75 73 74 20 62 | 65 20 6d 61 69 6e 74 61 |r must b|e mainta|
|00005da0| 69 6e 65 64 20 74 6f 20 | 70 72 65 76 65 6e 74 20 |ined to |prevent |
|00005db0| 61 20 6a 6f 62 20 6f 72 | 20 61 20 77 61 69 74 20 |a job or| a wait |
|00005dc0| 74 69 6d 65 6f 75 74 2e | 20 20 49 66 20 74 68 65 |timeout.| If the|
|00005dd0| 72 65 20 69 73 20 6e 6f | 20 63 6f 6d 6d 75 6e 69 |re is no| communi|
|00005de0| 63 61 74 69 6f 6e 20 66 | 6f 72 20 61 20 70 65 72 |cation f|or a per|
|00005df0| 69 6f 64 20 6f 66 20 74 | 69 6d 65 20 28 6f 76 65 |iod of t|ime (ove|
|00005e00| 72 20 74 77 6f 20 6d 69 | 6e 75 74 65 73 29 2c 20 |r two mi|nutes), |
|00005e10| 74 68 65 20 70 72 69 6e | 74 65 72 20 74 69 6d 65 |the prin|ter time|
|00005e20| 73 20 6f 75 74 20 61 6e | 64 20 74 68 65 20 70 72 |s out an|d the pr|
|00005e30| 69 6e 74 20 6a 6f 62 20 | 74 65 72 6d 69 6e 61 74 |int job |terminat|
|00005e40| 65 73 20 64 75 65 20 74 | 6f 20 61 20 77 61 69 74 |es due t|o a wait|
|00005e50| 20 20 74 69 6d 65 6f 75 | 74 2e 20 20 4f 72 2c 20 | timeou|t. Or, |
|00005e60| 69 66 20 74 68 65 20 70 | 72 69 6e 74 20 6a 6f 62 |if the p|rint job|
|00005e70| 20 72 65 71 75 69 72 65 | 73 20 6d 6f 72 65 20 74 | require|s more t|
|00005e80| 68 61 6e 20 74 68 72 65 | 65 20 6d 69 6e 75 74 65 |han thre|e minute|
|00005e90| 73 20 74 6f 20 70 72 69 | 6e 74 2c 20 74 68 65 20 |s to pri|nt, the |
|00005ea0| 70 72 69 6e 74 20 6a 6f | 62 20 74 65 72 6d 69 6e |print jo|b termin|
|00005eb0| 61 74 65 73 20 64 75 65 | 20 74 6f 20 61 20 6a 6f |ates due| to a jo|
|00005ec0| 62 20 74 69 6d 65 6f 75 | 74 2e 20 20 53 69 6e 63 |b timeou|t. Sinc|
|00005ed0| 65 2c 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 67 |e, there| is no g|
|00005ee0| 6f 6f 64 20 6d 65 74 68 | 6f 64 20 74 6f 20 64 65 |ood meth|od to de|
|00005ef0| 74 65 72 6d 69 6e 65 20 | 74 6f 20 77 68 61 74 20 |termine |to what |
|00005f00| 74 79 70 65 20 6f 66 20 | 70 72 69 6e 74 65 72 20 |type of |printer |
|00005f10| 61 6e 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 69 |an appli|cation i|
|00005f20| 73 20 70 72 69 6e 74 69 | 6e 67 2c 20 69 74 20 69 |s printi|ng, it i|
|00005f30| 73 20 70 72 6f 62 61 62 | 6c 79 20 61 20 67 6f 6f |s probab|ly a goo|
|00005f40| 64 20 69 64 65 61 20 74 | 6f 20 64 6f 63 75 6d 65 |d idea t|o docume|
|00005f50| 6e 74 20 74 68 65 20 70 | 6f 73 73 69 62 69 6c 69 |nt the p|ossibili|
|00005f60| 74 79 20 6f 66 20 61 20 | 4c 61 73 65 72 57 72 69 |ty of a |LaserWri|
|00005f70| 74 65 72 20 74 69 6d 69 | 6e 67 20 6f 75 74 20 66 |ter timi|ng out f|
|00005f80| 6f 72 20 61 20 75 73 65 | 72 20 77 68 6f 20 63 68 |or a use|r who ch|
|00005f90| 6f 6f 73 65 73 20 74 6f | 20 73 65 6c 65 63 74 20 |ooses to| select |
|00005fa0| d2 70 61 75 73 65 d3 20 | 66 6f 72 20 6f 76 65 72 |.pause. |for over|
|00005fb0| 20 74 77 6f 20 6d 69 6e | 75 74 65 73 2e 0d 45 72 | two min|utes..Er|
|00005fc0| 72 6f 72 20 4d 65 73 73 | 61 67 65 73 20 43 72 65 |ror Mess|ages Cre|
|00005fd0| 61 74 65 64 20 49 6e 20 | 50 72 69 6e 74 20 4c 61 |ated In |Print La|
|00005fe0| 6e 64 c9 0d 54 68 65 20 | 50 72 69 6e 74 69 6e 67 |nd..The |Printing|
|00005ff0| 20 4d 61 6e 61 67 65 72 | 20 72 65 70 6f 72 74 73 | Manager| reports|
|00006000| 20 74 68 65 20 65 72 72 | 6f 72 20 6d 65 73 73 61 | the err|or messa|
|00006010| 67 65 73 20 63 6f 76 65 | 72 65 64 20 69 6e 20 74 |ges cove|red in t|
|00006020| 68 69 73 20 73 65 63 74 | 69 6f 6e 2e 20 20 49 66 |his sect|ion. If|
|00006030| 20 61 6e 20 65 72 72 6f | 72 20 74 68 61 74 20 64 | an erro|r that d|
|00006040| 6f 65 73 20 6e 6f 74 20 | 62 65 6c 6f 6e 67 20 74 |oes not |belong t|
|00006050| 6f 20 74 68 65 20 50 72 | 69 6e 74 69 6e 67 20 4d |o the Pr|inting M|
|00006060| 61 6e 61 67 65 72 20 6f | 63 63 75 72 73 2c 20 74 |anager o|ccurs, t|
|00006070| 68 65 20 50 72 69 6e 74 | 69 6e 67 20 4d 61 6e 61 |he Print|ing Mana|
|00006080| 67 65 72 20 70 75 74 73 | 20 69 74 20 69 6e 74 6f |ger puts| it into|
|00006090| 20 6c 6f 77 20 6d 65 6d | 6f 72 79 2c 20 77 68 65 | low mem|ory, whe|
|000060a0| 72 65 20 69 74 20 63 61 | 6e 20 62 65 20 72 65 74 |re it ca|n be ret|
|000060b0| 72 69 65 76 65 64 20 77 | 69 74 68 20 61 20 63 61 |rieved w|ith a ca|
|000060c0| 6c 6c 20 74 6f 20 50 72 | 45 72 72 6f 72 2c 20 61 |ll to Pr|Error, a|
|000060d0| 6e 64 20 74 65 72 6d 69 | 6e 61 74 65 73 20 74 68 |nd termi|nates th|
|000060e0| 65 20 70 72 69 6e 74 69 | 6e 67 20 6c 6f 6f 70 2c |e printi|ng loop,|
|000060f0| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 2e 20 20 | if nece|ssary. |
|00006100| 41 73 20 61 6c 72 65 61 | 64 79 20 64 6f 63 75 6d |As alrea|dy docum|
|00006110| 65 6e 74 65 64 2c 20 69 | 66 20 79 6f 75 20 65 6e |ented, i|f you en|
|00006120| 63 6f 75 6e 74 65 72 20 | 61 6e 20 65 72 72 6f 72 |counter |an error|
|00006130| 20 69 6e 20 74 68 65 20 | 6d 69 64 64 6c 65 20 6f | in the |middle o|
|00006140| 66 20 61 20 70 72 69 6e | 74 69 6e 67 20 6c 6f 6f |f a prin|ting loo|
|00006150| 70 2c 20 64 6f 20 6e 6f | 74 20 6a 75 6d 70 20 6f |p, do no|t jump o|
|00006160| 75 74 3b 20 66 61 6c 6c | 20 74 68 72 6f 75 67 68 |ut; fall| through|
|00006170| 20 74 68 65 20 6c 6f 6f | 70 20 61 6e 64 20 6c 65 | the loo|p and le|
|00006180| 74 20 74 68 65 20 50 72 | 69 6e 74 69 6e 67 20 4d |t the Pr|inting M|
|00006190| 61 6e 61 67 65 72 20 74 | 65 72 6d 69 6e 61 74 65 |anager t|erminate|
|000061a0| 20 70 72 6f 70 65 72 6c | 79 2e 0d 45 72 72 6f 72 | properl|y..Error|
|000061b0| 20 43 6f 64 65 09 43 6f | 6e 73 74 61 6e 74 09 44 | Code.Co|nstant.D|
|000061c0| 65 73 63 72 69 70 74 69 | 6f 6e 0d 09 30 09 6e 6f |escripti|on..0.no|
|000061d0| 45 72 72 09 4e 6f 20 65 | 72 72 6f 72 0d 09 31 32 |Err.No e|rror..12|
|000061e0| 38 09 69 50 72 41 62 6f | 72 74 09 41 62 6f 72 74 |8.iPrAbo|rt.Abort|
|000061f0| 20 74 68 65 20 70 72 69 | 6e 74 69 6e 67 20 70 72 | the pri|nting pr|
|00006200| 6f 63 65 73 73 20 0d 09 | 09 09 28 43 6f 6d 6d 61 |ocess ..|..(Comma|
|00006210| 6e 64 2d 70 65 72 69 6f | 64 29 0d 09 2d 31 09 69 |nd-perio|d)..-1.i|
|00006220| 50 72 53 61 76 65 50 46 | 69 6c 09 50 72 6f 62 6c |PrSavePF|il.Probl|
|00006230| 65 6d 20 73 61 76 69 6e | 67 20 70 72 69 6e 74 20 |em savin|g print |
|00006240| 66 69 6c 65 0d 09 2d 31 | 37 09 63 6f 6e 74 72 6f |file..-1|7.contro|
|00006250| 6c 45 72 72 09 55 6e 69 | 6d 70 6c 65 6d 65 6e 74 |lErr.Uni|mplement|
|00006260| 65 64 20 43 6f 6e 74 72 | 6f 6c 20 63 61 6c 6c 0d |ed Contr|ol call.|
|00006270| 09 2d 32 37 09 69 49 4f | 41 62 6f 72 74 09 49 2f |.-27.iIO|Abort.I/|
|00006280| 4f 20 70 72 6f 62 6c 65 | 6d 73 0d 09 2d 31 30 38 |O proble|ms..-108|
|00006290| 09 69 4d 65 6d 46 75 6c | 6c 45 72 72 09 4e 6f 74 |.iMemFul|lErr.Not|
|000062a0| 20 65 6e 6f 75 67 68 20 | 68 65 61 70 20 73 70 61 | enough |heap spa|
|000062b0| 63 65 0d 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ce.The f|ollowing|
|000062c0| 20 65 72 72 6f 72 73 20 | 61 72 65 20 73 70 65 63 | errors |are spec|
|000062d0| 69 66 69 63 20 74 6f 20 | 74 68 65 20 4c 61 73 65 |ific to |the Lase|
|000062e0| 72 57 72 69 74 65 72 20 | 66 61 6d 69 6c 79 3a 0d |rWriter |family:.|
|000062f0| 09 2d 34 31 30 31 09 09 | 50 72 69 6e 74 65 72 20 |.-4101..|Printer |
|00006300| 6e 6f 74 20 66 6f 75 6e | 64 20 6f 72 20 63 6c 6f |not foun|d or clo|
|00006310| 73 65 64 0d 09 2d 34 31 | 30 30 09 09 43 6f 6e 6e |sed..-41|00..Conn|
|00006320| 65 63 74 69 6f 6e 20 6a | 75 73 74 20 63 6c 6f 73 |ection j|ust clos|
|00006330| 65 64 0d 09 2d 34 30 39 | 39 09 09 57 72 69 74 65 |ed..-409|9..Write|
|00006340| 20 72 65 71 75 65 73 74 | 20 74 6f 6f 20 62 69 67 | request| too big|
|00006350| 0d 09 2d 34 30 39 38 09 | 09 52 65 71 75 65 73 74 |..-4098.|.Request|
|00006360| 20 61 6c 72 65 61 64 79 | 20 61 63 74 69 76 65 0d | already| active.|
|00006370| 09 2d 34 30 39 37 09 09 | 42 61 64 20 63 6f 6e 6e |.-4097..|Bad conn|
|00006380| 65 63 74 69 6f 6e 20 72 | 65 66 6e 75 6d 0d 09 2d |ection r|efnum..-|
|00006390| 34 30 39 36 09 09 4e 6f | 20 66 72 65 65 20 43 6f |4096..No| free Co|
|000063a0| 6e 6e 65 63 74 20 43 6f | 6e 74 72 6f 6c 20 42 6c |nnect Co|ntrol Bl|
|000063b0| 6f 63 6b 73 20 28 43 43 | 42 73 29 20 61 76 61 69 |ocks (CC|Bs) avai|
|000063c0| 6c 61 62 6c 65 0d 09 2d | 38 31 33 33 09 09 50 6f |lable..-|8133..Po|
|000063d0| 73 74 53 63 72 69 70 74 | 20 65 72 72 6f 72 20 6f |stScript| error o|
|000063e0| 63 63 75 72 72 65 64 20 | 64 75 72 69 6e 67 20 74 |ccurred |during t|
|000063f0| 72 61 6e 73 6d 69 73 73 | 69 6f 6e 20 6f 66 20 64 |ransmiss|ion of d|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.